CMake: manpage creation is now optional

This commit is contained in:
Campbell Barton 2014-11-13 14:07:34 +01:00
parent c9f87df47f
commit 1eecb1feaf
2 changed files with 28 additions and 14 deletions

@ -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 )

@ -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)
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,11 +407,13 @@ if(UNIX AND NOT APPLE)
if(WITH_PYTHON_MODULE)
# pass
else()
if(WITH_DOC_MANPAGE)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1
DESTINATION "."
)
endif()
endif()
install(
TARGETS blender
DESTINATION "."
@ -444,12 +449,14 @@ if(UNIX AND NOT APPLE)
TARGETS blender
DESTINATION bin
)
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
install(