vcpkg/ports/matio/portfile.cmake

38 lines
1.1 KiB
CMake
Raw Normal View History

2017-07-06 04:04:17 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO tbeu/matio
REF ca56394e5672115df1981996ed12524d1d551259 # v1.5.19
SHA512 67c239d8aabafaa935775f3b260ba0756c196b0d845ef5116365c9aa6a0b24dae70d92c4e74d5d43ae073ae0744f084f0f58ead864eb77c813d43dbbb3e4ec5e
2017-07-06 04:04:17 +08:00
HEAD_REF master
PATCHES fix-dependencies.patch
2017-07-06 04:04:17 +08:00
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
2017-07-06 04:04:17 +08:00
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
hdf5 MATIO_WITH_HDF5
zlib MATIO_WITH_ZLIB
extended-sparse MATIO_EXTENDED_SPARSE
mat73 MATIO_MAT73
pic MATIO_PIC
)
vcpkg_cmake_configure(
2017-07-06 04:04:17 +08:00
SOURCE_PATH ${SOURCE_PATH}
2018-03-13 16:52:00 +08:00
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
-DMATIO_SHARED=${BUILD_SHARED}
-DMATIO_USE_CONAN=OFF
2017-07-06 04:04:17 +08:00
)
vcpkg_cmake_install()
2017-07-06 04:04:17 +08:00
vcpkg_copy_pdbs()
vcpkg_copy_tools(TOOL_NAMES matdump AUTO_CLEAN)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)