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
|
|
|
|
REF 73c280cd55ca2b42019c8a9aa54af10e41e27b9d # v5.7.0
|
|
|
|
SHA512 c70c53e5f5efe47255d23f36e71ffd75d61905a13a634a26bfbbd43c3c8764b7805db9a8cbe48c6cf69b2a1028701cb7118074bbbc01de71faf4f30bf0be22f9
|
|
|
|
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)
|
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-08-01 04:01:02 +08:00
|
|
|
PREFER_NINJA
|
2020-11-19 05:08:22 +08:00
|
|
|
OPTIONS
|
2021-03-16 02:06:19 +08:00
|
|
|
-D_BUILD_EXAMPLES=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
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
vcpkg_install_cmake(DISABLE_PARALLEL)
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
file(GLOB REMOVE_DLLS
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/*.dll"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/*.dll"
|
|
|
|
)
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
file(GLOB DEBUG_DLLS
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/*.dll"
|
|
|
|
)
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
file(GLOB DLLS
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/*.dll"
|
|
|
|
)
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
if(DLLS)
|
|
|
|
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
endif()
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
if(DEBUG_DLLS)
|
|
|
|
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
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
|
|
|
if(REMOVE_DLLS)
|
|
|
|
file(REMOVE ${REMOVE_DLLS})
|
|
|
|
endif()
|
2017-06-10 04:18:30 +08:00
|
|
|
|
2017-06-10 13:48:22 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2020-11-19 05:08:22 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|