Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / compilers / dictu / 0001-force-sqlite-to-be-found.patch
blob8de4c9f57f6aa88cc833691dec33bca8f2a53434
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
6 ---
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)
20 set(THREADS)
22 if(DISABLE_HTTP)
23 @@ -20,16 +20,10 @@ else()
24 list(APPEND libraries curl)
25 endif()
27 -if(NOT SQLITE_LIB)
28 - set(THREADS_PREFER_PTHREAD_FLAG ON)
29 - find_package(Threads REQUIRED)
30 - set(THREADS Threads::Threads)
31 -else()
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)
36 -endif()
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)
42 if(WIN32)
43 # ws2_32 is required for winsock2.h to work correctly
44 --
45 2.32.0