vcpkg/ports/leveldb/portfile.cmake

41 lines
1.1 KiB
CMake
Raw Normal View History

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2017-10-25 20:05:17 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/leveldb
2023-10-03 08:37:58 +08:00
REF "${VERSION}"
SHA512 ac15eac29387b9f702a901b6567d47a9f8c17cf5c7d8700a77ec771da25158c83b04959c33f3d4de7a3f033ef08f545d14ba823a8d527e21889c4b78065b0f84
2019-06-18 01:56:03 +08:00
HEAD_REF master
PATCHES
fix-dependencies.patch
fix-util-install.patch
2017-10-25 20:05:17 +08:00
)
file(COPY "${CURRENT_PORT_DIR}/leveldbConfig.cmake.in" DESTINATION "${SOURCE_PATH}/cmake")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
crc32c WITH_CRC32C
snappy WITH_SNAPPY
)
2019-07-16 02:20:11 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DLEVELDB_BUILD_TESTS=OFF
-DLEVELDB_BUILD_BENCHMARKS=OFF
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
2017-10-25 20:05:17 +08:00
)
vcpkg_cmake_install()
2017-10-25 20:05:17 +08:00
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
2019-07-16 02:20:11 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2019-06-18 01:56:03 +08:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")