aboutsummaryrefslogtreecommitdiff
path: root/ports
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 /ports
parent7221344fd89a46b2bb4eb300f0633c76823bee55 (diff)
downloadvcpkg-a759caf15e031744e99e9718633fcc8d9a60b077.tar.gz
vcpkg-a759caf15e031744e99e9718633fcc8d9a60b077.zip
[gsl] Fix finding release libs in debug configurations. Fixes #2982.
Diffstat (limited to 'ports')
-rw-r--r--ports/gsl/CMakeLists.txt7
-rw-r--r--ports/gsl/CONTROL2
-rw-r--r--ports/gsl/portfile.cmake2
-rw-r--r--ports/gsl/usage4
4 files changed, 10 insertions, 5 deletions
diff --git a/ports/gsl/CMakeLists.txt b/ports/gsl/CMakeLists.txt
index eb38a4431..0027fe291 100644
--- a/ports/gsl/CMakeLists.txt
+++ b/ports/gsl/CMakeLists.txt
@@ -63,10 +63,11 @@ target_link_libraries(gsl PUBLIC gslcblas)
if(INSTALL_HEADERS)
set_target_properties(gsl PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}")
endif()
-target_include_directories(gslcblas PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
-target_include_directories(gsl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(gslcblas PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(gsl PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
# For the build, we need to copy all headers to the gsl directory
-file(COPY ${PUBLIC_HEADERS} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/gsl")
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gsl)
+file(COPY ${PUBLIC_HEADERS} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gsl")
set(TARGET_INSTALL_OPTIONS)
if(INSTALL_HEADERS)
diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL
index b6dc858dc..f02ecc2ee 100644
--- a/ports/gsl/CONTROL
+++ b/ports/gsl/CONTROL
@@ -1,3 +1,3 @@
Source: gsl
-Version: 2.4-2
+Version: 2.4-3
Description: The GNU Scientific Library is a numerical library for C and C++ programmers
diff --git a/ports/gsl/portfile.cmake b/ports/gsl/portfile.cmake
index 519fe4708..12c0526bc 100644
--- a/ports/gsl/portfile.cmake
+++ b/ports/gsl/portfile.cmake
@@ -27,7 +27,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsl/COPYING ${CURRENT_PACKAGES_DIR}/share/gsl/copyright)
vcpkg_copy_pdbs()
diff --git a/ports/gsl/usage b/ports/gsl/usage
new file mode 100644
index 000000000..f1ae92436
--- /dev/null
+++ b/ports/gsl/usage
@@ -0,0 +1,4 @@
+The package gsl is compatible with built-in CMake targets:
+
+ find_package(GSL REQUIRED)
+ target_link_libraries(main PRIVATE GSL::gsl GSL::gslcblas)