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/sqlite-orm | |
Diffstat (limited to 'vcpkg/ports/sqlite-orm')
| -rw-r--r-- | vcpkg/ports/sqlite-orm/fix-dependency.patch | 25 | ||||
| -rw-r--r-- | vcpkg/ports/sqlite-orm/portfile.cmake | 34 | ||||
| -rw-r--r-- | vcpkg/ports/sqlite-orm/vcpkg.json | 29 |
3 files changed, 88 insertions, 0 deletions
diff --git a/vcpkg/ports/sqlite-orm/fix-dependency.patch b/vcpkg/ports/sqlite-orm/fix-dependency.patch new file mode 100644 index 0000000..fac6ae2 --- /dev/null +++ b/vcpkg/ports/sqlite-orm/fix-dependency.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a56294f29..d784c4d5f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,8 +44,8 @@ set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include") + add_library(sqlite_orm INTERFACE) + add_library(sqlite_orm::sqlite_orm ALIAS sqlite_orm) + +-find_package(SQLite3 REQUIRED) +-target_link_libraries(sqlite_orm INTERFACE SQLite::SQLite3) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++target_link_libraries(sqlite_orm INTERFACE unofficial::sqlite3::sqlite3) + + target_sources(sqlite_orm INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/sqlite_orm/sqlite_orm.h>) + +diff --git a/cmake/SqliteOrmConfig.cmake.in b/cmake/SqliteOrmConfig.cmake.in +index e0635d28a..30403cd41 100644 +--- a/cmake/SqliteOrmConfig.cmake.in ++++ b/cmake/SqliteOrmConfig.cmake.in +@@ -1,4 +1,4 @@ + include(CMakeFindDependencyMacro) +-find_dependency(SQLite3) ++find_dependency(unofficial-sqlite3) + + include(${CMAKE_CURRENT_LIST_DIR}/SqliteOrmTargets.cmake) diff --git a/vcpkg/ports/sqlite-orm/portfile.cmake b/vcpkg/ports/sqlite-orm/portfile.cmake new file mode 100644 index 0000000..7d641fb --- /dev/null +++ b/vcpkg/ports/sqlite-orm/portfile.cmake @@ -0,0 +1,34 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fnc12/sqlite_orm + REF "v${VERSION}" + SHA512 3e939ddb31e8f03a5f885e459b1ba8040b58e697a715148b829b075d612d1c8a5686ec889155ec9804929e11ec11285a39af3f1eb27a4edf0bcc56c4ee7530b1 + HEAD_REF master + PATCHES + fix-dependency.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test BUILD_TESTING + example BUILD_EXAMPLES +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DSQLITE_ORM_ENABLE_CXX_17=OFF + -DSQLITE_ORM_ENABLE_CXX_20=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME SqliteOrm CONFIG_PATH lib/cmake/SqliteOrm) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
\ No newline at end of file diff --git a/vcpkg/ports/sqlite-orm/vcpkg.json b/vcpkg/ports/sqlite-orm/vcpkg.json new file mode 100644 index 0000000..386dad6 --- /dev/null +++ b/vcpkg/ports/sqlite-orm/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "sqlite-orm", + "version": "1.9.1", + "description": "SQLite ORM light header only library for modern C++", + "homepage": "https://github.com/fnc12/sqlite_orm", + "license": "AGPL-3.0-or-later OR MIT", + "dependencies": [ + "sqlite3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "example": { + "description": "Build examples" + }, + "test": { + "description": "Build sqlite_orm unit tests", + "dependencies": [ + "catch2" + ] + } + } +} |