diff options
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 12 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 12 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 13 | ||||
-rw-r--r-- | intern/cycles/cmake/external_libs.cmake | 8 |
4 files changed, 39 insertions, 6 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 04fa1561f88..9f1824ec827 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -429,6 +429,18 @@ if(WITH_HARU) endif() endif() +if(WITH_CYCLES_PATH_GUIDING) + find_package(openpgl QUIET) + if(openpgl_FOUND) + get_target_property(OPENPGL_LIBRARIES openpgl::openpgl LOCATION) + get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES) + message(STATUS "Found OpenPGL: ${OPENPGL_LIBRARIES}") + else() + set(WITH_CYCLES_PATH_GUIDING OFF) + message(STATUS "OpenPGL not found, disabling WITH_CYCLES_PATH_GUIDING") + endif() +endif() + set(ZSTD_ROOT_DIR ${LIBDIR}/zstd) find_package(Zstd REQUIRED) diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 47410b5f368..35103ec441b 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -584,6 +584,18 @@ if(WITH_HARU) endif() endif() +if(WITH_CYCLES_PATH_GUIDING) + find_package_wrapper(openpgl) + if(openpgl_FOUND) + get_target_property(OPENPGL_LIBRARIES openpgl::openpgl LOCATION) + get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES) + message(STATUS "Found OpenPGL: ${OPENPGL_LIBRARIES}") + else() + set(WITH_CYCLES_PATH_GUIDING OFF) + message(STATUS "OpenPGL not found, disabling WITH_CYCLES_PATH_GUIDING") + endif() +endif() + if(EXISTS ${LIBDIR}) without_system_libs_end() endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 866d0bede3d..4778ddebea6 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -936,6 +936,19 @@ if(WITH_HARU) endif() endif() +if(WITH_CYCLES_PATH_GUIDING) + find_package(openpgl QUIET) + if(openpgl_FOUND) + get_target_property(OPENPGL_LIBRARIES_RELEASE openpgl::openpgl LOCATION_RELEASE) + get_target_property(OPENPGL_LIBRARIES_DEBUG openpgl::openpgl LOCATION_DEBUG) + set(OPENPGL_LIBRARIES optimized ${OPENPGL_LIBRARIES_RELEASE} debug ${OPENPGL_LIBRARIES_DEBUG}) + get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES) + else() + set(WITH_CYCLES_PATH_GUIDING OFF) + message(STATUS "OpenPGL not found, disabling WITH_CYCLES_PATH_GUIDING") + endif() +endif() + set(ZSTD_INCLUDE_DIRS ${LIBDIR}/zstd/include) set(ZSTD_LIBRARIES ${LIBDIR}/zstd/lib/zstd_static.lib) diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake index ac508e36965..9335024f2eb 100644 --- a/intern/cycles/cmake/external_libs.cmake +++ b/intern/cycles/cmake/external_libs.cmake @@ -104,10 +104,6 @@ if(CYCLES_STANDALONE_REPOSITORY) else() unset(_cycles_lib_dir) endif() -else() - if(EXISTS ${LIBDIR}) - set(_cycles_lib_dir ${LIBDIR}) - endif() endif() ########################################################################### @@ -277,7 +273,7 @@ endif() # OpenPGL ########################################################################### -if(WITH_CYCLES_PATH_GUIDING) +if(CYCLES_STANDALONE_REPOSITORY AND WITH_CYCLES_PATH_GUIDING) if(EXISTS ${_cycles_lib_dir}) set(openpgl_DIR ${_cycles_lib_dir}/openpgl/lib/cmake/openpgl) endif() @@ -545,7 +541,7 @@ endif() if(CYCLES_STANDALONE_REPOSITORY) if((WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI) OR - WITH_CYCLES_HYDRA_RENDER_DELEGATE) + WITH_CYCLES_HYDRA_RENDER_DELEGATE) if(MSVC AND EXISTS ${_cycles_lib_dir}) set(Epoxy_LIBRARIES "${_cycles_lib_dir}/epoxy/lib/epoxy.lib") set(Epoxy_INCLUDE_DIRS "${_cycles_lib_dir}/epoxy/include") |