Changeset View
Changeset View
Standalone View
Standalone View
source/creator/CMakeLists.txt
| Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | |||||
| install( | install( | ||||
| CODE | CODE | ||||
| "file(REMOVE_RECURSE ${TARGETDIR_VER})" | "file(REMOVE_RECURSE ${TARGETDIR_VER})" | ||||
| ) | ) | ||||
| if(WITH_PYTHON) | if(WITH_PYTHON) | ||||
| # install(CODE "message(\"copying blender scripts...\")") | # install(CODE "message(\"copying blender scripts...\")") | ||||
| # exclude addons_contrib if release | # exclude addons_contrib if release branch | ||||
| if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR | if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR | ||||
| "${BLENDER_VERSION_CYCLE}" STREQUAL "rc") | "${BLENDER_VERSION_CYCLE}" STREQUAL "rc" OR | ||||
| "${BLENDER_VERSION_CYCLE}" STREQUAL "beta") | |||||
| set(ADDON_EXCLUDE_CONDITIONAL "addons_contrib/*") | set(ADDON_EXCLUDE_CONDITIONAL "addons_contrib/*") | ||||
| else() | else() | ||||
| set(ADDON_EXCLUDE_CONDITIONAL "_addons_contrib/*") # Dummy, won't do anything. | set(ADDON_EXCLUDE_CONDITIONAL "_addons_contrib/*") # Dummy, won't do anything. | ||||
| endif() | endif() | ||||
| # do not install freestyle dir if disabled | # do not install freestyle dir if disabled | ||||
| if(NOT WITH_FREESTYLE) | if(NOT WITH_FREESTYLE) | ||||
| set(FREESTYLE_EXCLUDE_CONDITIONAL "freestyle/*") | set(FREESTYLE_EXCLUDE_CONDITIONAL "freestyle/*") | ||||
| ▲ Show 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | macro(install_dir from to) | ||||
| ) | ) | ||||
| endmacro() | endmacro() | ||||
| # ----------------------------------------------------------------------------- | # ----------------------------------------------------------------------------- | ||||
| # Install Targets (Platform Specific) | # Install Targets (Platform Specific) | ||||
| if(UNIX AND NOT APPLE) | if(UNIX AND NOT APPLE) | ||||
| if(NOT WITH_PYTHON_MODULE) | |||||
| if(WITH_DOC_MANPAGE) | |||||
| add_custom_target( | |||||
| blender_man_page ALL | |||||
| COMMAND | |||||
| ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py | |||||
| --blender ${EXECUTABLE_OUTPUT_PATH}/blender | |||||
| --output ${CMAKE_CURRENT_BINARY_DIR}/blender.1 | |||||
| ) | |||||
| add_dependencies(blender_man_page blender) | |||||
| endif() | |||||
| endif() | |||||
| if(PLATFORM_BUNDLED_LIBRARIES AND TARGETDIR_LIB) | if(PLATFORM_BUNDLED_LIBRARIES AND TARGETDIR_LIB) | ||||
| install( | install( | ||||
| FILES ${PLATFORM_BUNDLED_LIBRARIES} | FILES ${PLATFORM_BUNDLED_LIBRARIES} | ||||
| DESTINATION ${TARGETDIR_LIB} | DESTINATION ${TARGETDIR_LIB} | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| # There are a few differences between portable and system install. | # There are a few differences between portable and system install. | ||||
| Show All 12 Lines | if(WITH_PYTHON_MODULE) | ||||
| # none of the other files are needed currently | # none of the other files are needed currently | ||||
| elseif(WITH_INSTALL_PORTABLE) | elseif(WITH_INSTALL_PORTABLE) | ||||
| install( | install( | ||||
| TARGETS blender | TARGETS blender | ||||
| DESTINATION "." | DESTINATION "." | ||||
| ) | ) | ||||
| if(WITH_DOC_MANPAGE) | |||||
| install( | |||||
| FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 | |||||
| DESTINATION "." | |||||
| ) | |||||
| endif() | |||||
| install( | install( | ||||
| FILES | FILES | ||||
| ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop | ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop | ||||
| ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg | ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg | ||||
| ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/symbolic/apps/blender-symbolic.svg | ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/symbolic/apps/blender-symbolic.svg | ||||
| DESTINATION "." | DESTINATION "." | ||||
| ) | ) | ||||
| Show All 30 Lines | if(EXISTS ${LIBDIR}/mesa) | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| else() | else() | ||||
| # main blender binary | # main blender binary | ||||
| install( | install( | ||||
| TARGETS blender | TARGETS blender | ||||
| DESTINATION bin | DESTINATION bin | ||||
| ) | ) | ||||
| if(WITH_DOC_MANPAGE) | |||||
| # Manual page (only with `blender` binary). | |||||
| install( | |||||
| FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 | |||||
| DESTINATION share/man/man1 | |||||
| ) | |||||
| endif() | |||||
| # Misc files. | # Misc files. | ||||
| install( | install( | ||||
| FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop | FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop | ||||
| DESTINATION share/applications | DESTINATION share/applications | ||||
| ) | ) | ||||
| install( | install( | ||||
| FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg | FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg | ||||
| ▲ Show 20 Lines • Show All 1,000 Lines • ▼ Show 20 Lines | |||||
| # ----------------------------------------------------------------------------- | # ----------------------------------------------------------------------------- | ||||
| # Windows shared library manifest | # Windows shared library manifest | ||||
| if(WIN32) | if(WIN32) | ||||
| windows_generate_shared_manifest() | windows_generate_shared_manifest() | ||||
| endif() | endif() | ||||
| # ----------------------------------------------------------------------------- | # ----------------------------------------------------------------------------- | ||||
| # Steps that Run Blender | |||||
| # | |||||
| # As executing Blender is needed - it's important this operation runs after the shared | |||||
| # libraries have been installed to their destination. | |||||
| if(UNIX AND NOT APPLE) | |||||
| if(NOT WITH_PYTHON_MODULE) | |||||
| if(WITH_DOC_MANPAGE) | |||||
| install( | |||||
| CODE "\ | |||||
| execute_process(\ | |||||
| COMMAND \ | |||||
| \"${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py\" \ | |||||
| --blender \"${EXECUTABLE_OUTPUT_PATH}/blender\" \ | |||||
| --output \"${CMAKE_CURRENT_BINARY_DIR}/blender.1\"\ | |||||
| )" | |||||
| DEPENDS blender | |||||
| ) | |||||
| if(WITH_INSTALL_PORTABLE) | |||||
| install( | |||||
| FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 | |||||
| DESTINATION "." | |||||
| ) | |||||
| else() | |||||
| # Manual page (only with `blender` binary). | |||||
| install( | |||||
| FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 | |||||
| DESTINATION share/man/man1 | |||||
| ) | |||||
| endif() | |||||
| endif() | |||||
| endif() | |||||
| endif() | |||||
| # ----------------------------------------------------------------------------- | |||||
| # Post-install script | # Post-install script | ||||
| if(POSTINSTALL_SCRIPT) | if(POSTINSTALL_SCRIPT) | ||||
| install(SCRIPT ${POSTINSTALL_SCRIPT}) | install(SCRIPT ${POSTINSTALL_SCRIPT}) | ||||
| endif() | endif() | ||||