2016-09-21 06:21:14 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-07-25 08:44:01 +08:00
|
|
|
set(GSL_VERSION 2.4)
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsl-${GSL_VERSION})
|
|
|
|
|
2017-05-04 02:25:35 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2017-07-25 08:44:01 +08:00
|
|
|
URLS "ftp://ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz"
|
|
|
|
FILENAME "gsl-${GSL_VERSION}.tar.gz"
|
|
|
|
SHA512 12442b023dd959e8b22a9c486646b5cedec7fdba0daf2604cda365cf96d10d99aefdec2b42e59c536cc071da1525373454e5ed6f4b15293b305ca9b1dc6db130
|
2017-05-04 02:25:35 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
2017-05-03 20:06:12 +08:00
|
|
|
|
2017-05-04 02:25:35 +08:00
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/0001-configure.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/0002-add-fp-control.patch
|
2016-09-21 06:21:14 +08:00
|
|
|
)
|
|
|
|
|
2017-05-04 02:25:35 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2016-09-21 06:21:14 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2018-03-08 03:56:21 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl)
|
2017-05-04 02:25:35 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsl/COPYING ${CURRENT_PACKAGES_DIR}/share/gsl/copyright)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|