2019-09-10 01:51:56 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO lballabio/QuantLib
|
2023-07-20 05:19:15 +08:00
|
|
|
REF "v${VERSION}"
|
2024-04-27 00:45:46 +08:00
|
|
|
SHA512 b99051ec5b621e9bfd91851487d3dd2153618785b458fbe039b7ab58de8f6da0a36eb0240182a11696ab8ab67788069fc2c4e7efa347ddf3bb77fafe5b190a05
|
2019-09-10 01:51:56 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-11-12 05:38:44 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
# This can (and should) be removed if QuantLib ever supports dynamically linking on Windows
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2019-09-10 01:51:56 +08:00
|
|
|
|
2022-01-21 02:29:37 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-09-10 01:51:56 +08:00
|
|
|
OPTIONS
|
2021-11-12 05:38:44 +08:00
|
|
|
-DQL_BUILD_BENCHMARK=OFF
|
|
|
|
-DQL_BUILD_EXAMPLES=OFF
|
|
|
|
-DQL_BUILD_TEST_SUITE=OFF
|
2019-09-10 01:51:56 +08:00
|
|
|
)
|
|
|
|
|
2022-01-21 02:29:37 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME QuantLib CONFIG_PATH lib/cmake/QuantLib)
|
2024-04-27 00:45:46 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-09-10 01:51:56 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-06-16 02:12:37 +08:00
|
|
|
|
2022-01-21 02:29:37 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-09-10 01:51:56 +08:00
|
|
|
|
2024-04-27 00:45:46 +08:00
|
|
|
# Remove the "bin" directories if we are building static libraries
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
|
|
|
|
2022-06-16 02:12:37 +08:00
|
|
|
# Install custom usage
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|
|
|
|
|
2019-09-10 01:51:56 +08:00
|
|
|
# Handle copyright
|
2022-06-16 02:12:37 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|