From 4a5b969aa40246db268511b564ea2ef19bfbcedb Mon Sep 17 00:00:00 2001 From: Alex Fuller Date: Thu, 25 Jul 2024 23:04:17 +1000 Subject: [PATCH 1/2] Toggle for precompiled dependencies --- CMakeLists.txt | 3 +++ src/cmake/external_libs.cmake | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 444d2e0d6..9d6f07070 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,9 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ########################################################################### # Options. +# Use precompiled dependencies +option(WITH_CYCLES_DEPENDENCIES "Use precompiled dependencies" ON) + # Library dependencies option(WITH_CYCLES_ALEMBIC "Build with Alembic procedural support" ON) option(WITH_CYCLES_EMBREE "Build with Embree support" ON) diff --git a/src/cmake/external_libs.cmake b/src/cmake/external_libs.cmake index bb07b29a4..3bf3ac65a 100644 --- a/src/cmake/external_libs.cmake +++ b/src/cmake/external_libs.cmake @@ -67,7 +67,7 @@ else() endif() endif() -if(EXISTS ${_cycles_lib_dir}) +if(EXISTS ${_cycles_lib_dir} AND WITH_CYCLES_DEPENDENCIES) message(STATUS "Using precompiled libraries at ${_cycles_lib_dir}") _set_default(ALEMBIC_ROOT_DIR "${_cycles_lib_dir}/alembic") @@ -118,7 +118,11 @@ if(EXISTS ${_cycles_lib_dir}) # Ignore system libraries set(CMAKE_IGNORE_PATH "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES};${CMAKE_SYSTEM_INCLUDE_PATH};${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}") else() - message(STATUS "No precompiled libraries found at ${_cycles_lib_dir}") + if(NOT WITH_CYCLES_DEPENDENCIES) + message(STATUS "Not using precompiled libraries") + else() + message(STATUS "No precompiled libraries found at ${_cycles_lib_dir}") + endif() message(STATUS "Attempting to use system libraries instead") unset(_cycles_lib_dir) endif() -- 2.30.2 From 91d6b6924bd8d7c0e89417b50f700f90e4171cb8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 9 Aug 2024 15:05:36 +0200 Subject: [PATCH 2/2] Rename option to match Blender --- CMakeLists.txt | 4 ++-- src/cmake/external_libs.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d6f07070..9f1a70260 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,8 +92,8 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ########################################################################### # Options. -# Use precompiled dependencies -option(WITH_CYCLES_DEPENDENCIES "Use precompiled dependencies" ON) +# Use precompiled library dependencies +option(WITH_LIBS_PRECOMPILED "Use precompiled library dependencies" ON) # Library dependencies option(WITH_CYCLES_ALEMBIC "Build with Alembic procedural support" ON) diff --git a/src/cmake/external_libs.cmake b/src/cmake/external_libs.cmake index 3bf3ac65a..9e5a08083 100644 --- a/src/cmake/external_libs.cmake +++ b/src/cmake/external_libs.cmake @@ -67,7 +67,7 @@ else() endif() endif() -if(EXISTS ${_cycles_lib_dir} AND WITH_CYCLES_DEPENDENCIES) +if(EXISTS ${_cycles_lib_dir} AND WITH_LIBS_PRECOMPILED) message(STATUS "Using precompiled libraries at ${_cycles_lib_dir}") _set_default(ALEMBIC_ROOT_DIR "${_cycles_lib_dir}/alembic") @@ -118,7 +118,7 @@ if(EXISTS ${_cycles_lib_dir} AND WITH_CYCLES_DEPENDENCIES) # Ignore system libraries set(CMAKE_IGNORE_PATH "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES};${CMAKE_SYSTEM_INCLUDE_PATH};${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}") else() - if(NOT WITH_CYCLES_DEPENDENCIES) + if(NOT WITH_LIBS_PRECOMPILED) message(STATUS "Not using precompiled libraries") else() message(STATUS "No precompiled libraries found at ${_cycles_lib_dir}") -- 2.30.2