2022-09-20 03:30:40 +08:00
|
|
|
file(READ "${CURRENT_PORT_DIR}/vcpkg.json" manifest)
|
|
|
|
string(JSON version GET "${manifest}" version)
|
|
|
|
|
2017-05-05 07:23:54 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO google/snappy
|
2022-09-20 03:30:40 +08:00
|
|
|
REF ${version}
|
2021-11-06 05:25:34 +08:00
|
|
|
SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024
|
2017-05-05 07:23:54 +08:00
|
|
|
HEAD_REF master
|
2022-08-04 01:30:09 +08:00
|
|
|
PATCHES
|
|
|
|
fix_clang-cl_build.patch
|
2017-05-05 07:23:54 +08:00
|
|
|
)
|
|
|
|
|
2021-11-06 05:25:34 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-07-29 21:27:34 +08:00
|
|
|
OPTIONS
|
2018-03-13 00:16:43 +08:00
|
|
|
-DSNAPPY_BUILD_TESTS=OFF
|
2021-09-28 11:52:58 +08:00
|
|
|
-DSNAPPY_BUILD_BENCHMARKS=OFF
|
2021-11-06 05:25:34 +08:00
|
|
|
)
|
2017-05-05 07:23:54 +08:00
|
|
|
|
2021-11-06 05:25:34 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Snappy)
|
2017-05-05 07:23:54 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-09-20 03:30:40 +08:00
|
|
|
string(JSON version GET "${manifest}" version)
|
|
|
|
string(JSON description GET "${manifest}" description)
|
|
|
|
set(name "${PORT}")
|
|
|
|
|
|
|
|
configure_file("${CURRENT_PORT_DIR}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY)
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
configure_file("${CURRENT_PORT_DIR}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY)
|
2023-02-14 00:44:55 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" "/include" "/../include")
|
2022-09-20 03:30:40 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2021-11-06 05:25:34 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|