diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2020-03-25 21:47:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-25 13:47:07 -0700 |
| commit | 52273558f64dda28bb3c5ada3ee2c33564a5fd31 (patch) | |
| tree | ec406b3f379c5f1f077befc06d40bf375c808121 /scripts | |
| parent | da0a15485256837569d0e6b00a5940757ff57971 (diff) | |
| download | vcpkg-52273558f64dda28bb3c5ada3ee2c33564a5fd31.tar.gz vcpkg-52273558f64dda28bb3c5ada3ee2c33564a5fd31.zip | |
Map configuration also for single configuration generators (#10397)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 3b41eb065..1eebc3b8d 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -26,21 +26,19 @@ if(VCPKG_TOOLCHAIN) return() endif() -if(DEFINED CMAKE_CONFIGURATION_TYPES) #Generating with a multi config generator - #If CMake does not have a mapping for MinSizeRel and RelWithDebInfo in imported targets - #it will map those configuration to the first valid configuration in CMAKE_CONFIGURATION_TYPES. - #By default this is the debug configuration which is wrong. - if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL) - set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;") - if(VCPKG_VERBOSE) - message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL set to MinSizeRel;Release;") - endif() +#If CMake does not have a mapping for MinSizeRel and RelWithDebInfo in imported targets +#it will map those configuration to the first valid configuration in CMAKE_CONFIGURATION_TYPES or the targets IMPORTED_CONFIGURATIONS. +#In most cases this is the debug configuration which is wrong. +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL) + set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL set to MinSizeRel;Release;") endif() - if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO) - set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;") - if(VCPKG_VERBOSE) - message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO set to RelWithDebInfo;Release;") - endif() +endif() +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO) + set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO set to RelWithDebInfo;Release;") endif() endif() |
