1 From bb4767f8fc413ca4cb42879a9a226fd26f10e094 Mon Sep 17 00:00:00 2001
2 From: Lucas Ransan <lucas@ransan.tk>
3 Date: Tue, 3 Aug 2021 20:39:11 +0200
4 Subject: [PATCH] force sqlite to be found
7 src/CMakeLists.txt | 16 +++++-----------
8 1 file changed, 5 insertions(+), 11 deletions(-)
10 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
11 index a0f3fee..58b4d0b 100644
12 --- a/src/CMakeLists.txt
13 +++ b/src/CMakeLists.txt
14 @@ -9,7 +9,7 @@ set(INCLUDE_DIR include/)
15 list(FILTER sources EXCLUDE REGEX "(main|linenoise|utf8).c")
16 list(FILTER headers EXCLUDE REGEX "(linenoise|utf8).h")
18 -find_library(SQLITE_LIB SQLite3)
19 +find_package(SQLite3 REQUIRED)
23 @@ -20,16 +20,10 @@ else()
24 list(APPEND libraries curl)
28 - set(THREADS_PREFER_PTHREAD_FLAG ON)
29 - find_package(Threads REQUIRED)
30 - set(THREADS Threads::Threads)
32 - list(FILTER sources EXCLUDE REGEX "sqlite3.c")
33 - list(FILTER headers EXCLUDE REGEX "sqlite3.h")
34 - list(APPEND libraries ${SQLITE_LIB})
35 - add_compile_definitions(INCLUDE_SQLITE_LIB)
37 +list(FILTER sources EXCLUDE REGEX "sqlite3.c")
38 +list(FILTER headers EXCLUDE REGEX "sqlite3.h")
39 +list(APPEND libraries ${SQLite3_LIBRARIES})
40 +add_compile_definitions(SQLite3_INCLUDE_DIR)
43 # ws2_32 is required for winsock2.h to work correctly