early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,10 @@
diff --git a/cmake/SqliteOrmConfig.cmake.in b/cmake/SqliteOrmConfig.cmake.in
index e0635d2..30403cd 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)

View File

@@ -0,0 +1,45 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,15 +31,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(CTest)
### Dependencies
-add_subdirectory(dependencies)
### Main Build Targets
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/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 2857b65..3ee46e6 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -4,5 +4,5 @@ file(GLOB files "*.cpp")
foreach(file ${files})
get_filename_component(file_basename ${file} NAME_WE)
add_executable(${file_basename} ${file})
- target_link_libraries(${file_basename} PRIVATE sqlite_orm sqlite3)
+ target_link_libraries(${file_basename} PRIVATE sqlite_orm)
endforeach()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index fd41e70..8087899 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -0,6 +0,8 @@
cmake_minimum_required (VERSION 3.2)
option(SQLITE_ORM_OMITS_CODECVT "Omits codec testing" OFF)
+
+find_package(Catch2 CONFIG REQUIRED)
add_executable(unit_tests
tests.cpp

View File

@@ -0,0 +1,34 @@
# header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fnc12/sqlite_orm
REF v1.7.1
SHA512 ab934959245e8e0aaefd543ef0c1ab336547e4c311aff9dda916c7577c006622dec917313350d0d8bde4366d42b458c915fc2ea2fb927c01910fe429e55c8bbc
HEAD_REF master
PATCHES
fix-features-build-error.patch
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
)
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)

28
externals/vcpkg/ports/sqlite-orm/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,28 @@
{
"name": "sqlite-orm",
"version": "1.7.1",
"description": "SQLite ORM light header only library for modern C++",
"homepage": "https://github.com/fnc12/sqlite_orm",
"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"
]
}
}
}