diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/unqlite | |
Diffstat (limited to 'vcpkg/ports/unqlite')
| -rw-r--r-- | vcpkg/ports/unqlite/portfile.cmake | 38 | ||||
| -rw-r--r-- | vcpkg/ports/unqlite/usage | 6 | ||||
| -rw-r--r-- | vcpkg/ports/unqlite/vcpkg.json | 18 |
3 files changed, 62 insertions, 0 deletions
diff --git a/vcpkg/ports/unqlite/portfile.cmake b/vcpkg/ports/unqlite/portfile.cmake new file mode 100644 index 0000000..204e530 --- /dev/null +++ b/vcpkg/ports/unqlite/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO symisc/unqlite + REF 5d951cd302c14cc6a4e7f8552b47f1e13a511d1d + SHA512 4b6507a2188dbbf76231748f3a6e990fe687a2a5e2ee8cca3bfc80605e5dbcef3f3e85b032685aa5cf490442d2b570dab8a4b8eb88b97ed84022bf74602c2dfb + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "threads" ENABLE_THREADS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() + + +if ("threads" IN_LIST FEATURES) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/unqlite.h" + "#define _UNQLITE_H_" [[ +#define _UNQLITE_H_ +#define UNQLITE_ENABLE_THREADS +]] + ) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/unqlite/usage b/vcpkg/ports/unqlite/usage new file mode 100644 index 0000000..470fddd --- /dev/null +++ b/vcpkg/ports/unqlite/usage @@ -0,0 +1,6 @@ +unqlite can be used from CMake via: + find_path(UNQLITE_INCLUDE_DIRS "unqlite.h" REQUIRED) + find_library(UNQLITE_LIBRARIES unqlite REQUIRED) + + target_include_directories(main PRIVATE ${UNQLITE_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${UNQLITE_LIBRARIES}) diff --git a/vcpkg/ports/unqlite/vcpkg.json b/vcpkg/ports/unqlite/vcpkg.json new file mode 100644 index 0000000..c7fe595 --- /dev/null +++ b/vcpkg/ports/unqlite/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "unqlite", + "version-date": "2025-04-29", + "description": "An embedded NoSQL, transactional database engine", + "homepage": "https://unqlite.symisc.net/", + "license": "BSD-2-Clause", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "threads": { + "description": "Compile with thread safety support" + } + } +} |