2021-01-11 16:06:54 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2021-11-23 21:21:28 +01:00
|
|
|
@@ -31,15 +31,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
2021-01-11 16:06:54 +08:00
|
|
|
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
|
2021-11-23 21:21:28 +01:00
|
|
|
@@ -0,6 +0,8 @@
|
|
|
|
cmake_minimum_required (VERSION 3.2)
|
2021-01-11 16:06:54 +08:00
|
|
|
|
2021-11-23 21:21:28 +01:00
|
|
|
option(SQLITE_ORM_OMITS_CODECVT "Omits codec testing" OFF)
|
2021-01-11 16:06:54 +08:00
|
|
|
+
|
2021-11-23 21:21:28 +01:00
|
|
|
+find_package(Catch2 CONFIG REQUIRED)
|
2021-01-11 16:06:54 +08:00
|
|
|
|
2021-11-23 21:21:28 +01:00
|
|
|
add_executable(unit_tests
|
|
|
|
tests.cpp
|