diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-13 16:07:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-13 16:07:34 +0300 |
commit | 1eecb1feaf21ef1c6e210d610922d70c659cc811 (patch) | |
tree | 209c02b7b0f0162ba562823e80035a83b927cc19 | |
parent | c9f87df47ff7a24411ae59d2550d86989fecd7a9 (diff) |
CMake: manpage creation is now optional
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 35 |
2 files changed, 28 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3459030101a..1babdcfd654 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,6 +329,13 @@ endif() # Unit testsing option(WITH_GTESTS "Enable GTest unit testing" OFF) + +# Documentation +if(UNIX AND NOT APPLE) + option(WITH_DOC_MANPAGE "Create a manual page (Unix manpage)" OFF) +endif() + + # OpenGL option(WITH_GLEW_MX "Support multiple GLEW contexts (experimental)" OFF ) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 7fcba4de188..181571bda77 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -392,11 +392,14 @@ endif() if(UNIX AND NOT APPLE) if(NOT WITH_PYTHON_MODULE) - add_custom_target(blender_man_page ALL - COMMAND ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py ${EXECUTABLE_OUTPUT_PATH}/blender ${CMAKE_CURRENT_BINARY_DIR}/blender.1) - - add_dependencies(blender_man_page blender) - + if(WITH_DOC_MANPAGE) + add_custom_target( + blender_man_page ALL + COMMAND ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py + ${EXECUTABLE_OUTPUT_PATH}/blender + ${CMAKE_CURRENT_BINARY_DIR}/blender.1) + add_dependencies(blender_man_page blender) + endif() endif() # there are a few differences between portable and system install @@ -404,10 +407,12 @@ if(UNIX AND NOT APPLE) if(WITH_PYTHON_MODULE) # pass else() - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 - DESTINATION "." - ) + if(WITH_DOC_MANPAGE) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 + DESTINATION "." + ) + endif() endif() install( TARGETS blender @@ -444,11 +449,13 @@ if(UNIX AND NOT APPLE) TARGETS blender DESTINATION bin ) - # manpage only with 'blender' binary - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 - DESTINATION share/man/man1 - ) + if(WITH_DOC_MANPAGE) + # manpage only with 'blender' binary + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 + DESTINATION share/man/man1 + ) + endif() endif() # misc files |