Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
| Show First 20 Lines • Show All 1,509 Lines • ▼ Show 20 Lines | elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") | ||||
| string(REPLACE ";" " " _WARNINGS "${_WARNINGS}") | string(REPLACE ";" " " _WARNINGS "${_WARNINGS}") | ||||
| set(C_WARNINGS "${_WARNINGS}") | set(C_WARNINGS "${_WARNINGS}") | ||||
| set(CXX_WARNINGS "${_WARNINGS}") | set(CXX_WARNINGS "${_WARNINGS}") | ||||
| unset(_WARNINGS) | unset(_WARNINGS) | ||||
| endif() | endif() | ||||
| # ensure python header is found since detection can fail, this could happen | # ensure python header is found since detection can fail, this could happen | ||||
| # with _any_ library but since we used a fixed python version this tends to | # with _any_ library but since we used a fixed python version this tends to | ||||
campbellbarton: There is no need to cache this, it can be a global property, see: `DELAYED_INSTALL_FILES` | |||||
| # be most problematic. | # be most problematic. | ||||
| if(WITH_PYTHON) | if(WITH_PYTHON) | ||||
| if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h") | if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h") | ||||
| message(FATAL_ERROR | message(FATAL_ERROR | ||||
| "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n" | "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n" | ||||
| "Set the cache entry 'PYTHON_INCLUDE_DIR' to point " | "Set the cache entry 'PYTHON_INCLUDE_DIR' to point " | ||||
| "to a valid python include path. Containing " | "to a valid python include path. Containing " | ||||
| "Python.h for python version \"${PYTHON_VERSION}\"" | "Python.h for python version \"${PYTHON_VERSION}\"" | ||||
| ) | ) | ||||
| endif() | endif() | ||||
Done Inline Actionspicky, should be "|/addons_contrib/*" campbellbarton: picky, should be `"|/addons_contrib/*"` | |||||
| if(WIN32 OR APPLE) | if(WIN32 OR APPLE) | ||||
| # Windows and macOS have this bundled with Python libraries. | # Windows and macOS have this bundled with Python libraries. | ||||
| elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) | elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) | ||||
| if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND)) | if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND)) | ||||
| find_python_package(numpy) | find_python_package(numpy) | ||||
| unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE) | unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE) | ||||
| set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module") | set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module") | ||||
| mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) | mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| if(WIN32 OR APPLE) | if(WIN32 OR APPLE) | ||||
| # pass, we have this in lib/python/site-packages | # pass, we have this in lib/python/site-packages | ||||
| elseif(WITH_PYTHON_INSTALL_REQUESTS) | elseif(WITH_PYTHON_INSTALL_REQUESTS) | ||||
| find_python_package(requests) | find_python_package(requests) | ||||
| endif() | endif() | ||||
| # List with directories that will be excluded in the install of creator | |||||
| set_property(GLOBAL PROPERTY PYTHON_MODULE_EXCLUDE ".git|.gitignore|.arcconfig|__pycache__|CMakeLists.txt") | |||||
| # do not install freestyle dir if disabled | |||||
| if(NOT WITH_FREESTYLE) | |||||
| set_property(GLOBAL APPEND_STRING PROPERTY PYTHON_MODULE_EXCLUDE "|freestyle/*") | |||||
| endif() | |||||
| if(EXISTS ${CMAKE_SOURCE_DIR}/release/scripts/addons_contrib/CMakeLists.txt) # TEMPORARILY NECESSARY | |||||
| # exclude addons_contrib if release | |||||
| if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR | |||||
| "${BLENDER_VERSION_CYCLE}" STREQUAL "rc") | |||||
| set_property(GLOBAL APPEND_STRING PROPERTY PYTHON_MODULE_EXCLUDE "|/addons_contrib/*") | |||||
| else() | |||||
| add_subdirectory(release/scripts/addons_contrib) | |||||
| endif() | |||||
| endif() | |||||
| if(EXISTS ${CMAKE_SOURCE_DIR}/release/scripts/addons/CMakeLists.txt) # TEMPORARILY NECESSARY | |||||
| add_subdirectory(release/scripts/addons) | |||||
| endif() | |||||
| endif() | endif() | ||||
| if(MSVC) | if(MSVC) | ||||
| # MSVC needs to be tested first, since clang on windows will | # MSVC needs to be tested first, since clang on windows will | ||||
| # match the compiler test below but clang-cl does not accept -std=c++11 | # match the compiler test below but clang-cl does not accept -std=c++11 | ||||
| # since it is on by default and cannot be turned off. | # since it is on by default and cannot be turned off. | ||||
| # | # | ||||
| # Nothing special is needed, C++11 features are available by default. | # Nothing special is needed, C++11 features are available by default. | ||||
| ▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines | |||||
There is no need to cache this, it can be a global property, see: DELAYED_INSTALL_FILES