summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-29 11:54:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-29 11:54:50 (GMT)
commitb1ecce8ae7b8aea03b98f11335ca6514b425e7c5 (patch)
tree9a32fcc8cb74c1886f19cf5067710cb476767ae7
parentbeb4f5df47fe28f9dbbb5d6cecfd783e92de14ac (diff)
parente0a62b84b5dd5a5b3ad684550938dea47bbe3f57 (diff)
downloadCMake-b1ecce8ae7b8aea03b98f11335ca6514b425e7c5.zip
CMake-b1ecce8ae7b8aea03b98f11335ca6514b425e7c5.tar.gz
CMake-b1ecce8ae7b8aea03b98f11335ca6514b425e7c5.tar.bz2
Merge topic 'traversaro-master-patch-54928'
e0a62b84b5 FindGLUT: On Windows and with multiple config generator do not use pkg-config Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7721
-rw-r--r--Modules/FindGLUT.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 320ddad..6934089 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -95,7 +95,10 @@ function(_add_glut_target_simple)
endfunction()
find_package(PkgConfig QUIET)
-if(PKG_CONFIG_FOUND)
+get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+# On WIN32 and when using a multiple config generator, pkg-config
+# is not used as it cannot distinguish between release and debug libraries
+if(PKG_CONFIG_FOUND AND NOT (_isMultiConfig AND WIN32))
# Tell pkg-config not to strip any -I flags to make sure GLUT_INCLUDE_DIRS
# will be defined.
if(DEFINED ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS})