Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2022-09-27 19:48:09 +0300
committerRay Molenkamp <github@lazydodo.com>2022-09-27 19:48:09 +0300
commit447368b472962fc4431f713a7908e26abe3aaf90 (patch)
tree2521774862521d91f8676c36f40207a34ff91964 /intern/cycles
parent2b88ee50fb7b3ed7e6c0704eee8b39b404219430 (diff)
Fix: OpenPGL related build error on windows
Debug and Release libs are different libs on Windows and will give linker errors when you try to mix and match them. This changes retrieves both libs and fills the OPENPGL_LIBRARIES variable appropriately resolving the linker error.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/cmake/external_libs.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index ab709b1ca10..184bf7d6ae3 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -284,7 +284,13 @@ if(WITH_CYCLES_PATH_GUIDING)
find_package(openpgl QUIET)
if(openpgl_FOUND)
- get_target_property(OPENPGL_LIBRARIES openpgl::openpgl LOCATION)
+ if(WIN32)
+ 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})
+ else()
+ get_target_property(OPENPGL_LIBRARIES openpgl::openpgl LOCATION)
+ endif()
get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES)
else()
set(WITH_CYCLES_PATH_GUIDING OFF)