Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
| Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | |||||
| option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON) | option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON) | ||||
| set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducible builds (empty string disables this option)") | set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducible builds (empty string disables this option)") | ||||
| set(BUILDINFO_OVERRIDE_TIME "" CACHE STRING "Use instead of the current time for reproducible builds (empty string disables this option)") | set(BUILDINFO_OVERRIDE_TIME "" CACHE STRING "Use instead of the current time for reproducible builds (empty string disables this option)") | ||||
| set(CPACK_OVERRIDE_PACKAGENAME "" CACHE STRING "Use instead of the standard packagename (empty string disables this option)") | set(CPACK_OVERRIDE_PACKAGENAME "" CACHE STRING "Use instead of the standard packagename (empty string disables this option)") | ||||
| mark_as_advanced(CPACK_OVERRIDE_PACKAGENAME) | mark_as_advanced(CPACK_OVERRIDE_PACKAGENAME) | ||||
| mark_as_advanced(BUILDINFO_OVERRIDE_DATE) | mark_as_advanced(BUILDINFO_OVERRIDE_DATE) | ||||
| mark_as_advanced(BUILDINFO_OVERRIDE_TIME) | mark_as_advanced(BUILDINFO_OVERRIDE_TIME) | ||||
| if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16") | |||||
| option(WITH_UNITY_BUILD "Enable unity build for modules that support it to improve compile times" ON) | |||||
| mark_as_advanced(WITH_UNITY_BUILD) | |||||
| else() | |||||
| set(WITH_UNITY_BUILD OFF) | |||||
| endif() | |||||
| option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON) | option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON) | ||||
| option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON) | option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON) | ||||
| option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON) | option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON) | ||||
| option(WITH_PUGIXML "Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)" ON) | option(WITH_PUGIXML "Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)" ON) | ||||
| option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) | option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) | ||||
| option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" ) | option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" ) | ||||
| mark_as_advanced(WITH_SYSTEM_BULLET) | mark_as_advanced(WITH_SYSTEM_BULLET) | ||||
| option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ON) | option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ON) | ||||
| ▲ Show 20 Lines • Show All 867 Lines • ▼ Show 20 Lines | |||||
| endif() | endif() | ||||
| # set the endian define | # set the endian define | ||||
| if(MSVC) | if(MSVC) | ||||
| # for some reason this fails on msvc | # for some reason this fails on msvc | ||||
| add_definitions(-D__LITTLE_ENDIAN__) | add_definitions(-D__LITTLE_ENDIAN__) | ||||
| # OSX-Note: as we do cross-compiling with specific set architecture, | # OSX-Note: as we do cross-compiling with specific set architecture, | ||||
| # endianess-detection and auto-setting is counterproductive | # endianness-detection and auto-setting is counterproductive | ||||
| # so we just set endianness according CMAKE_OSX_ARCHITECTURES | # so we just set endianness according CMAKE_OSX_ARCHITECTURES | ||||
| elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR CMAKE_OSX_ARCHITECTURES MATCHES arm64) | elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR CMAKE_OSX_ARCHITECTURES MATCHES arm64) | ||||
| add_definitions(-D__LITTLE_ENDIAN__) | add_definitions(-D__LITTLE_ENDIAN__) | ||||
| elseif(CMAKE_OSX_ARCHITECTURES MATCHES ppc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc64) | elseif(CMAKE_OSX_ARCHITECTURES MATCHES ppc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc64) | ||||
| add_definitions(-D__BIG_ENDIAN__) | add_definitions(-D__BIG_ENDIAN__) | ||||
| else() | else() | ||||
| ▲ Show 20 Lines • Show All 673 Lines • ▼ Show 20 Lines | elseif(WITH_PYTHON_INSTALL_ZSTANDARD) | ||||
| find_python_package(zstandard "") | find_python_package(zstandard "") | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| # Select C++17 as the standard for C++ projects. | # Select C++17 as the standard for C++ projects. | ||||
| set(CMAKE_CXX_STANDARD 17) | set(CMAKE_CXX_STANDARD 17) | ||||
| # If C++17 is not available, downgrading to an earlier standard is NOT OK. | # If C++17 is not available, downgrading to an earlier standard is NOT OK. | ||||
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||||
| # Do not enable compiler specific language extentions. | # Do not enable compiler specific language extensions. | ||||
| set(CMAKE_CXX_EXTENSIONS OFF) | set(CMAKE_CXX_EXTENSIONS OFF) | ||||
| # Make MSVC properly report the value of the __cplusplus preprocessor macro | # Make MSVC properly report the value of the __cplusplus preprocessor macro | ||||
| # Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless | # Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless | ||||
| # of the C++ standard chosen above. | # of the C++ standard chosen above. | ||||
| if(MSVC AND MSVC_VERSION GREATER 1913) | if(MSVC AND MSVC_VERSION GREATER 1913) | ||||
| string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus") | string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus") | ||||
| endif() | endif() | ||||
| ▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines | |||||