From 60d975d1dc1fca094e50e8c038179ba06c6e2cf7 Mon Sep 17 00:00:00 2001 From: Camila Date: Tue, 29 Aug 2023 12:05:03 +0200 Subject: [PATCH] Ignore the USE_OUR_OWN_SQLITE3 flag. Always look for sqlite in the system in the 3 platforms. Signed-off-by: Camila --- cmake/modules/DefineCompilerFlags.cmake | 4 +--- src/csync/CMakeLists.txt | 18 +++--------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/cmake/modules/DefineCompilerFlags.cmake b/cmake/modules/DefineCompilerFlags.cmake index 5463bfb24..d2ef129c5 100644 --- a/cmake/modules/DefineCompilerFlags.cmake +++ b/cmake/modules/DefineCompilerFlags.cmake @@ -15,9 +15,7 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") # add -Wconversion ? # cannot be pedantic with sqlite3 directly linked # FIXME Can we somehow not use those flags for sqlite3.* but use them for the rest of csync? - if (NOT USE_OUR_OWN_SQLITE3) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors") - endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute") diff --git a/src/csync/CMakeLists.txt b/src/csync/CMakeLists.txt index deb6c36a3..4d74bbbf1 100644 --- a/src/csync/CMakeLists.txt +++ b/src/csync/CMakeLists.txt @@ -19,11 +19,7 @@ include(DefineOptions.cmake) include(DefineInstallationPaths) -if (APPLE OR WIN32) - set(USE_OUR_OWN_SQLITE3 TRUE) -else() - find_package(SQLite3 3.8.0 REQUIRED) -endif() +find_package(SQLite3 3.8.0 REQUIRED) include(ConfigureChecks.cmake) include(../common/common.cmake) @@ -70,16 +66,8 @@ target_include_directories( PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std ) -if(USE_OUR_OWN_SQLITE3) - message(STATUS "Using own sqlite3 version") - add_library(sqlite3 STATIC "${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3/sqlite3.c") - target_include_directories(sqlite3 PUBLIC "${CMAKE_SOURCE_DIR}/src/3rdparty/sqlite3") - target_link_libraries(nextcloud_csync PUBLIC sqlite3) -else() - target_include_directories(nextcloud_csync PUBLIC ${SQLITE3_INCLUDE_DIR}) - target_link_libraries(nextcloud_csync PUBLIC ${SQLITE3_LIBRARIES}) -endif() - +target_include_directories(nextcloud_csync PUBLIC ${SQLITE3_INCLUDE_DIR}) +target_link_libraries(nextcloud_csync PUBLIC ${SQLITE3_LIBRARIES}) generate_export_header(nextcloud_csync EXPORT_MACRO_NAME OCSYNC_EXPORT