vcpkg/ports/sundials/portfile.cmake

32 lines
1.0 KiB
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO LLNL/sundials
REF v5.8.0
SHA512 30f6a7bddf813634e4266c36331673b52448b719f938f45a4efb6a96cfbeea4fe168fdded89309672b148f8ef8bc05997d838627e828573900ec169a41472372
HEAD_REF master
PATCHES
install-dlls-in-bin.patch
2018-06-13 13:15:10 +08:00
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SUN_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SUN_BUILD_SHARED)
vcpkg_cmake_configure(
2017-06-10 13:48:22 +08:00
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-D_BUILD_EXAMPLES=OFF
-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
vcpkg_cmake_install(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
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
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})