pineapple/externals/vcpkg/ports/sqlite-orm/fix-features-build-error.patch

46 lines
1.5 KiB
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
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