aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-03-07 11:56:21 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-03-07 11:56:21 -0800
commita759caf15e031744e99e9718633fcc8d9a60b077 (patch)
tree74b6f53f512d12b2f34b237705768ecc60335380 /scripts
parent7221344fd89a46b2bb4eb300f0633c76823bee55 (diff)
downloadvcpkg-a759caf15e031744e99e9718633fcc8d9a60b077.tar.gz
vcpkg-a759caf15e031744e99e9718633fcc8d9a60b077.zip
[gsl] Fix finding release libs in debug configurations. Fixes #2982.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/vcpkg.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index b3e27b5d0..a1989b23a 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -251,6 +251,18 @@ macro(find_package name)
set_target_properties(hdf5::${HDF5TARGET}-static PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-shared")
endif()
endforeach()
+ elseif("${name}" STREQUAL "GSL")
+ _find_package(${ARGV})
+ if(GSL_FOUND AND TARGET GSL::gsl)
+ set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release )
+ set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Release )
+ if( EXISTS "${GSL_LIBRARY_DEBUG}" AND EXISTS "${GSL_CBLAS_LIBRARY_DEBUG}")
+ set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
+ set_target_properties( GSL::gsl PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG}" )
+ set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
+ set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" )
+ endif()
+ endif()
elseif("${name}" STREQUAL "CURL")
_find_package(${ARGV})
if(CURL_FOUND)