vcpkg/ports/gsl/portfile.cmake
Alexander Neumann 0de461216d
[vcpkg.cmake] Cleanup every special case in the find_package override (#18047)
* move boost out of the toolchain

* move icu out of the toolchain

* remove CURL from the toolchain (was already unreachable?)

* remove gsl from toolchain

* remove grpc from toolchain

* version stuff

* fix indent and missing endif()

* version stuff

* Revert changes to vcpkg.cmake

* push port version

* version stuff
2021-05-28 10:00:20 -07:00

30 lines
1.1 KiB
CMake

set(GSL_VERSION 2.6)
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz"
FILENAME "gsl-${GSL_VERSION}.tar.gz"
SHA512 0be8240715f0b86aba2c63d9f12da4dba4719d4e350e9308d279e0dd3b2f0519ea26fd2e38a17f3e8cf43aacbaa2455207a7ca0d6c305f3b8725e8ece2250a74
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
0001-configure.patch
0002-add-fp-control.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)