2021-03-16 02:06:19 +08:00
|
|
|
vcpkg_from_github(
|
2019-10-08 01:35:13 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-03-16 02:06:19 +08:00
|
|
|
REPO LLNL/sundials
|
2024-10-11 22:44:46 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 1c0448c6fa676364f6ba9c57fe4f96f734247795ae3331fc5f06f9e36c9d2fd92f85d3b126e5f31d8bace767953e2bebc638d31893474943255f1200bb39d065
|
2021-03-16 02:06:19 +08:00
|
|
|
HEAD_REF master
|
2018-06-13 13:15:10 +08:00
|
|
|
)
|
|
|
|
|
2020-11-19 05:08:22 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SUN_BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SUN_BUILD_SHARED)
|
|
|
|
|
2024-10-11 22:44:46 +08:00
|
|
|
if(VCPKG_TARGET_IS_ANDROID)
|
|
|
|
set(POSIX_TIMERS "-DSUNDIALS_POSIX_TIMERS=TRUE")
|
|
|
|
endif()
|
|
|
|
|
2021-10-19 05:31:57 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-05-05 06:09:15 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2024-10-11 22:44:46 +08:00
|
|
|
${POSIX_TIMERS}
|
2021-03-16 02:06:19 +08:00
|
|
|
-D_BUILD_EXAMPLES=OFF
|
2024-10-11 22:44:46 +08:00
|
|
|
-DSUNDIALS_TEST_UNITTESTS=OFF
|
2020-11-19 05:08:22 +08:00
|
|
|
-DBUILD_STATIC_LIBS=${SUN_BUILD_STATIC}
|
|
|
|
-DBUILD_SHARED_LIBS=${SUN_BUILD_SHARED}
|
2017-06-10 13:48:22 +08:00
|
|
|
)
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2022-05-05 06:09:15 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2022-05-05 06:09:15 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2024-10-11 22:44:46 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
2018-06-06 03:06:29 +08:00
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE")
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-05-05 06:09:15 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|