1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: Boyuan Yang <byang@debian.org>
Date: Wed, 19 Jun 2024 11:36:52 -0400
Subject: CMakeLists.txt: Use cmake builtin FindSQLite3
---
CMakeLists.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index abab7f7..5bf7380 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,8 @@ include("cmake/Catch.cmake")
project(SqliteModernCpp)
find_package(Catch2 CONFIG REQUIRED)
-find_package(sqlite3 CONFIG REQUIRED)
+include(FindSQLite3)
+find_package(SQLite3 REQUIRED)
set(TEST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
file(GLOB TEST_SOURCES ${TEST_SOURCE_DIR}/*.cc)
@@ -28,9 +29,9 @@ target_include_directories(sqlite_modern_cpp INTERFACE hdr/)
add_executable(tests_runner ${TEST_SOURCES})
target_include_directories(tests_runner INTERFACE ${SQLITE3_INCLUDE_DIRS})
if(ENABLE_SQLCIPHER_TESTS)
- target_link_libraries(tests_runner Catch2::Catch2 sqlite_modern_cpp sqlite3::sqlite3 -lsqlcipher)
+ target_link_libraries(tests_runner Catch2::Catch2 sqlite_modern_cpp SQLite::SQLite3 -lsqlcipher)
else()
- target_link_libraries(tests_runner Catch2::Catch2 sqlite_modern_cpp sqlite3::sqlite3)
+ target_link_libraries(tests_runner Catch2::Catch2 sqlite_modern_cpp SQLite::SQLite3)
endif()
catch_discover_tests(tests_runner)
|