Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
| Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | |||||
| # Blender internal features | # Blender internal features | ||||
| option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON) | option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON) | ||||
| mark_as_advanced(WITH_BLENDER) | mark_as_advanced(WITH_BLENDER) | ||||
| option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) | option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) | ||||
| option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON) | option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON) | ||||
| option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON) | option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON) | ||||
| mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they really know what they are doing. | mark_as_advanced(WITH_PYTHON) # don't want people disabling this unless they really know what they are doing. | ||||
| mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option. | mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option. | ||||
| option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF) | option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some efficiency, only enable for development)." OFF) | ||||
| mark_as_advanced(WITH_PYTHON_SAFETY) | mark_as_advanced(WITH_PYTHON_SAFETY) | ||||
| option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development), installs to PYTHON_SITE_PACKAGES (or CMAKE_INSTALL_PREFIX if WITH_INSTALL_PORTABLE is enabled)." OFF) | option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development), installs to PYTHON_SITE_PACKAGES (or CMAKE_INSTALL_PREFIX if WITH_INSTALL_PORTABLE is enabled)." OFF) | ||||
| if(APPLE) | if(APPLE) | ||||
| option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF) | option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF) | ||||
| endif() | endif() | ||||
| option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ${_init_BUILDINFO}) | option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ${_init_BUILDINFO}) | ||||
| if(${CMAKE_VERSION} VERSION_LESS 2.8.8) | if(${CMAKE_VERSION} VERSION_LESS 2.8.8) | ||||
| # add_library OBJECT arg unsupported | # add_library OBJECT arg unsupported | ||||
| set(WITH_BUILDINFO OFF) | set(WITH_BUILDINFO OFF) | ||||
| endif() | endif() | ||||
| set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducable 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 reproducable 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) | ||||
| 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)" ${_init_FFTW3}) | option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ${_init_FFTW3}) | ||||
| ▲ Show 20 Lines • Show All 648 Lines • ▼ Show 20 Lines | if(WITH_X11_XINPUT) | ||||
| if(X11_Xinput_LIB) | if(X11_Xinput_LIB) | ||||
| list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB}) | list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB}) | ||||
| else() | else() | ||||
| set(WITH_X11_XINPUT OFF) | set(WITH_X11_XINPUT OFF) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| if(WITH_X11_XF86VMODE) | if(WITH_X11_XF86VMODE) | ||||
| # XXX, why dont cmake make this available? | # XXX, why doesn't cmake make this available? | ||||
| find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) | find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) | ||||
| mark_as_advanced(X11_Xxf86vmode_LIB) | mark_as_advanced(X11_Xxf86vmode_LIB) | ||||
| if(X11_Xxf86vmode_LIB) | if(X11_Xxf86vmode_LIB) | ||||
| list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB}) | list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB}) | ||||
| else() | else() | ||||
| set(WITH_X11_XF86VMODE OFF) | set(WITH_X11_XF86VMODE OFF) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| ▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
| # Doing it now allows to use SSE/SSE2 in inline headers. | # Doing it now allows to use SSE/SSE2 in inline headers. | ||||
| if(SUPPORT_SSE_BUILD) | if(SUPPORT_SSE_BUILD) | ||||
| set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}") | set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}") | ||||
| add_definitions(-D__SSE__ -D__MMX__) | add_definitions(-D__SSE__ -D__MMX__) | ||||
| endif() | endif() | ||||
| if(SUPPORT_SSE2_BUILD) | if(SUPPORT_SSE2_BUILD) | ||||
| set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}") | set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}") | ||||
| add_definitions(-D__SSE2__) | add_definitions(-D__SSE2__) | ||||
| if(NOT SUPPORT_SSE_BUILD) # dont double up | if(NOT SUPPORT_SSE_BUILD) # don't double up | ||||
| add_definitions(-D__MMX__) | add_definitions(-D__MMX__) | ||||
| endif() | endif() | ||||
| 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 | # endianess-detection and auto-setting is counterproductive | ||||
| # so we just set endianess 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) | elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64) | ||||
| 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() | ||||
| include(TestBigEndian) | include(TestBigEndian) | ||||
| ▲ Show 20 Lines • Show All 799 Lines • Show Last 20 Lines | |||||