Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore the USE_OUR_OWN_SQLITE3 flag. #6008

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cmake/modules/DefineCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
18 changes: 3 additions & 15 deletions src/csync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down