vcpkg/ports/hypre/portfile.cmake

38 lines
1.1 KiB
CMake
Raw Normal View History

if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
2017-05-16 17:00:05 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO hypre-space/hypre
2023-10-03 07:09:38 +08:00
REF "v${VERSION}"
SHA512 fe92d09b56107845e3a4b7f0e7bbba5f319a7ebdaaecab3e6b89fae1fe2a79a9dd712806823ea518f5960f0eaa1088f6b82ebac63d3940478d36690f3adec4f2
HEAD_REF master
2017-05-16 17:00:05 +08:00
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" HYPRE_SHARED)
2017-05-16 17:00:05 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/src"
2017-05-16 17:00:05 +08:00
OPTIONS
-DHYPRE_SHARED=${HYPRE_SHARED}
-DHYPRE_ENABLE_HYPRE_BLAS=OFF
-DHYPRE_ENABLE_HYPRE_LAPACK=OFF
2017-05-16 17:00:05 +08:00
OPTIONS_RELEASE
-DHYPRE_BUILD_TYPE=Release
"-DHYPRE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}"
2017-05-16 17:00:05 +08:00
OPTIONS_DEBUG
-DHYPRE_BUILD_TYPE=Debug
"-DHYPRE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug"
2017-05-16 17:00:05 +08:00
)
vcpkg_cmake_install()
2017-05-16 17:00:05 +08:00
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/HYPRE)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
2017-05-16 17:00:05 +08:00
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)