diff options
author | Silvio Traversaro <pegua1@gmail.com> | 2022-09-27 18:01:43 (GMT) |
---|---|---|
committer | Silvio <silvio@traversaro.it> | 2022-09-28 07:40:25 (GMT) |
commit | e0a62b84b5dd5a5b3ad684550938dea47bbe3f57 (patch) | |
tree | 2a2d80e7526e797903c733f30853082e5e64ff9d /Modules/FindGLUT.cmake | |
parent | 164a156c7c26aaf4f30e73ae0cdb6d2e8a10e0a4 (diff) | |
download | CMake-e0a62b84b5dd5a5b3ad684550938dea47bbe3f57.zip CMake-e0a62b84b5dd5a5b3ad684550938dea47bbe3f57.tar.gz CMake-e0a62b84b5dd5a5b3ad684550938dea47bbe3f57.tar.bz2 |
FindGLUT: On Windows and with multiple config generator do not use pkg-config
Diffstat (limited to 'Modules/FindGLUT.cmake')
-rw-r--r-- | Modules/FindGLUT.cmake | 5 |
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}) |