vcpkg/ports/sundials/portfile.cmake

59 lines
1.5 KiB
CMake
Raw Normal View History

2017-06-10 13:48:22 +08:00
include(vcpkg_common_functions)
2017-06-10 04:18:30 +08:00
2018-06-06 03:06:29 +08:00
set(ARCHIVE_NAME "sundials-3.1.1")
2017-06-10 13:48:22 +08:00
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}")
2017-06-10 04:18:30 +08:00
2017-06-10 13:48:22 +08:00
vcpkg_download_distfile(ARCHIVE_FILE
URLS "https://computation.llnl.gov/projects/sundials/download/${ARCHIVE_NAME}.tar.gz"
FILENAME "${ARCHIVE_NAME}.tar.gz"
2018-06-06 03:06:29 +08:00
SHA512 3e8fc7183c5503943f1ba00c73b04c1614a48b6e6cb90559ec5481f9acffaa19acd97bd961611b251ebdc032f1a13f0919b0ab0cdfe9d9b4ddc99d40bef5719f
2017-06-10 13:48:22 +08:00
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
2017-06-10 04:18:30 +08:00
2018-06-13 13:15:10 +08:00
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/uwp-c4703-warning.patch
)
2017-06-10 13:48:22 +08:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
2017-06-10 13:48:22 +08:00
OPTIONS -DEXAMPLES_ENABLE=OFF
)
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
2017-06-10 13:48:22 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sundials 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()