2021-05-27 01:33:43 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO jll63/yomm2
|
2023-04-20 03:09:00 +08:00
|
|
|
REF "v${VERSION}"
|
2024-05-28 05:24:04 +08:00
|
|
|
SHA512 cd697ece15456013b398452f881f0fd04e35aedf20169ce0a88c442af7a40dada84a6a4cabb702fc8564ece83e1966da2dedceb5598873f57ba209a0e65a440c
|
2021-05-27 01:33:43 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
2023-09-19 01:12:53 +08:00
|
|
|
|
|
|
|
set(YOMM2_SHARED OFF)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE MATCHES "dynamic")
|
|
|
|
set(YOMM2_SHARED ON)
|
|
|
|
endif()
|
|
|
|
|
2024-04-24 01:55:14 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE MATCHES "static")
|
|
|
|
set(VCPKG_BUILD_TYPE release) # header-only
|
|
|
|
endif()
|
|
|
|
|
2023-03-02 02:39:29 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2024-05-28 05:24:04 +08:00
|
|
|
OPTIONS
|
2023-09-19 01:12:53 +08:00
|
|
|
-DYOMM2_ENABLE_EXAMPLES=OFF
|
2024-04-24 01:55:14 +08:00
|
|
|
-DYOMM2_ENABLE_TESTS=OFF
|
2023-09-19 01:12:53 +08:00
|
|
|
-DYOMM2_SHARED=${YOMM2_SHARED}
|
2021-05-27 01:33:43 +08:00
|
|
|
)
|
2023-03-02 02:39:29 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/YOMM2)
|
2023-09-19 01:12:53 +08:00
|
|
|
|
2021-05-27 01:33:43 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2023-09-19 01:12:53 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE MATCHES "static") # header only library in static build
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_PACKAGES_DIR}/debug")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|