2017-07-06 04:04:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO tbeu/matio
|
2023-11-14 02:51:17 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 b0ff73b7d39b68c87f371e397ed8f46040f1334e8d81d2b462f62bf7d14c6566e4f5a0c55955696cbbc035ff7b41e5811ce7429476ae48c1465f48f77b4dc6b2
|
2017-07-06 04:04:17 +08:00
|
|
|
HEAD_REF master
|
2021-06-11 07:22:46 +08:00
|
|
|
PATCHES fix-dependencies.patch
|
2017-07-06 04:04:17 +08:00
|
|
|
)
|
|
|
|
|
2021-06-11 07:22:46 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
2017-07-06 04:04:17 +08:00
|
|
|
|
2021-06-11 07:22:46 +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(
|
2022-05-18 02:15:06 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-06-11 07:22:46 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
|
|
-DMATIO_SHARED=${BUILD_SHARED}
|
|
|
|
-DMATIO_USE_CONAN=OFF
|
2017-07-06 04:04:17 +08:00
|
|
|
)
|
|
|
|
|
2021-06-11 07:22:46 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-07-06 04:04:17 +08:00
|
|
|
|
2023-10-24 02:35:25 +08:00
|
|
|
set(prefix "${CURRENT_INSTALLED_DIR}")
|
|
|
|
set(exec_prefix [[${prefix}]])
|
|
|
|
set(libdir [[${prefix}/lib]])
|
|
|
|
set(includedir [[${prefix}/include]])
|
|
|
|
configure_file("${SOURCE_PATH}/matio.pc.in" "${SOURCE_PATH}/matio.pc" @ONLY)
|
|
|
|
file(INSTALL "${SOURCE_PATH}/matio.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
set(includedir [[${prefix}/../include]])
|
|
|
|
file(INSTALL "${SOURCE_PATH}/matio.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
|
|
|
endif()
|
2017-07-06 04:04:17 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2023-10-24 02:35:25 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-06-11 07:22:46 +08:00
|
|
|
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES matdump AUTO_CLEAN)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2023-10-24 02:35:25 +08:00
|
|
|
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2021-06-11 07:22:46 +08:00
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|