Changeset View
Changeset View
Standalone View
Standalone View
source/creator/CMakeLists.txt
| Show First 20 Lines • Show All 326 Lines • ▼ Show 20 Lines | if(WITH_INSTALL_PORTABLE) | ||||
| set(TARGETDIR_VER ${BLENDER_VERSION}) | set(TARGETDIR_VER ${BLENDER_VERSION}) | ||||
| else() | else() | ||||
| set(TARGETDIR_VER share/blender/${BLENDER_VERSION}) | set(TARGETDIR_VER share/blender/${BLENDER_VERSION}) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| elseif(WIN32) | elseif(WIN32) | ||||
| set(TARGETDIR_VER ${BLENDER_VERSION}) | set(TARGETDIR_VER ${BLENDER_VERSION}) | ||||
campbellbarton: Would rather keep existing PATTERN's - and add REGEX as an extra argument/
Otherwise logic is… | |||||
| elseif(APPLE) | elseif(APPLE) | ||||
| if(WITH_PYTHON_MODULE) | if(WITH_PYTHON_MODULE) | ||||
| set(TARGETDIR_VER ${BLENDER_VERSION}) | set(TARGETDIR_VER ${BLENDER_VERSION}) | ||||
| else() | else() | ||||
| set(TARGETDIR_VER Blender.app/Contents/Resources/${BLENDER_VERSION}) | set(TARGETDIR_VER Blender.app/Contents/Resources/${BLENDER_VERSION}) | ||||
| endif() | endif() | ||||
| # Skip relinking on cpack / install | # Skip relinking on cpack / install | ||||
| set_target_properties(blender PROPERTIES BUILD_WITH_INSTALL_RPATH true) | set_target_properties(blender PROPERTIES BUILD_WITH_INSTALL_RPATH true) | ||||
| endif() | endif() | ||||
| # ----------------------------------------------------------------------------- | # ----------------------------------------------------------------------------- | ||||
| # Install Targets (Generic, All Platforms) | # Install Targets (Generic, All Platforms) | ||||
| # important to make a clean install each time, else old scripts get loaded. | # important to make a clean install each time, else old scripts get loaded. | ||||
| 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...\")") | ||||
| get_property(exclude_dirs GLOBAL PROPERTY PYTHON_MODULE_EXCLUDE) | |||||
| # exclude addons_contrib if release | |||||
| if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR | |||||
| "${BLENDER_VERSION_CYCLE}" STREQUAL "rc") | |||||
| set(ADDON_EXCLUDE_CONDITIONAL "addons_contrib/*") | |||||
| else() | |||||
| set(ADDON_EXCLUDE_CONDITIONAL "_addons_contrib/*") # dummy, wont do anything | |||||
| endif() | |||||
| # do not install freestyle dir if disabled | |||||
| if(NOT WITH_FREESTYLE) | |||||
| set(FREESTYLE_EXCLUDE_CONDITIONAL "freestyle/*") | |||||
| else() | |||||
| set(FREESTYLE_EXCLUDE_CONDITIONAL "_freestyle/*") # dummy, wont do anything | |||||
| endif() | |||||
| install( | install( | ||||
| DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts | DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts | ||||
| DESTINATION ${TARGETDIR_VER} | DESTINATION ${TARGETDIR_VER} | ||||
| PATTERN ".git" EXCLUDE | REGEX "${exclude_dirs}" EXCLUDE | ||||
| PATTERN ".gitignore" EXCLUDE | |||||
| PATTERN ".arcconfig" EXCLUDE | |||||
| PATTERN "__pycache__" EXCLUDE | |||||
| PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE | |||||
| PATTERN "${FREESTYLE_EXCLUDE_CONDITIONAL}" EXCLUDE | |||||
| ) | ) | ||||
| unset(ADDON_EXCLUDE_CONDITIONAL) | unset(ADDON_EXCLUDE_CONDITIONAL) | ||||
| unset(FREESTYLE_EXCLUDE_CONDITIONAL) | unset(FREESTYLE_EXCLUDE_CONDITIONAL) | ||||
| endif() | endif() | ||||
| # localization | # localization | ||||
| if(WITH_INTERNATIONAL) | if(WITH_INTERNATIONAL) | ||||
| ▲ Show 20 Lines • Show All 710 Lines • Show Last 20 Lines | |||||
Would rather keep existing PATTERN's - and add REGEX as an extra argument/
Otherwise logic is spread over different places.