2018-08-25 05:03:45 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO LMDB/lmdb
|
2023-09-27 16:22:44 +08:00
|
|
|
REF "LMDB_${VERSION}"
|
|
|
|
SHA512 a5763ff94af0b5bbc2406c52890797e6232e77593bacdb240441ed30c8634e4e6de6eba206880475544e21561ccd0be2dee16733d6ec35483eb1dbbb81913a8d
|
2018-08-25 05:03:45 +08:00
|
|
|
HEAD_REF master
|
2023-09-27 16:22:44 +08:00
|
|
|
PATCHES
|
|
|
|
getopt-win32.diff
|
2016-12-20 09:51:53 +08:00
|
|
|
)
|
2022-04-11 23:50:10 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/cmake/" DESTINATION "${SOURCE_PATH}/libraries/liblmdb")
|
2016-12-20 09:51:53 +08:00
|
|
|
|
2023-09-27 16:22:44 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS options_release
|
|
|
|
FEATURES
|
|
|
|
tools LMDB_BUILD_TOOLS
|
|
|
|
)
|
|
|
|
|
2022-04-11 23:50:10 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/libraries/liblmdb"
|
2023-09-27 16:22:44 +08:00
|
|
|
OPTIONS
|
|
|
|
"-DLMDB_VERSION=${VERSION}"
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
${options_release}
|
2016-12-20 09:51:53 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DLMDB_INSTALL_HEADERS=OFF
|
|
|
|
)
|
|
|
|
|
2022-04-11 23:50:10 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-09-27 16:22:44 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-lmdb)
|
2016-12-20 09:51:53 +08:00
|
|
|
|
2023-09-27 16:22:44 +08:00
|
|
|
if(LMDB_BUILD_TOOLS)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES mdb_copy mdb_dump mdb_load mdb_stat AUTO_CLEAN)
|
|
|
|
endif()
|
2022-04-11 23:50:10 +08:00
|
|
|
|
2023-09-27 16:22:44 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2016-12-20 09:51:53 +08:00
|
|
|
|
2023-09-27 16:22:44 +08:00
|
|
|
file(COPY "${CURRENT_PORT_DIR}/lmdb-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
vcpkg_install_copyright(
|
|
|
|
FILE_LIST
|
|
|
|
"${SOURCE_PATH}/libraries/liblmdb/COPYRIGHT"
|
|
|
|
"${SOURCE_PATH}/libraries/liblmdb/LICENSE"
|
|
|
|
)
|