Skip to content

Commit

Permalink
Merge pull request #229 from xvitaly/systemsqlite
Browse files Browse the repository at this point in the history
Explicitly find and link against system sqlite library
  • Loading branch information
SRombauts authored Dec 24, 2019
2 parents 8329e7a + 395c047 commit 11fab0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,6 @@ install(EXPORT ${PROJECT_NAME}Config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/$

## Build provided copy of SQLite3 C library ##

# TODO
#find_package(sqlite3)
#if(sqlite3_VERSION VERSION_LESS "3.19")
# set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
#endif()

option(SQLITECPP_USE_ASAN "Use Address Sanitizer." OFF)
if (SQLITECPP_USE_ASAN)
if ((CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 6) OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
Expand All @@ -230,6 +224,12 @@ if (SQLITECPP_INTERNAL_SQLITE)
add_subdirectory(sqlite3)
target_include_directories(sqlite3 PUBLIC "${PROJECT_SOURCE_DIR}/sqlite3")
target_include_directories(SQLiteCpp PRIVATE "${PROJECT_SOURCE_DIR}/sqlite3")
else (SQLITECPP_INTERNAL_SQLITE)
find_package (SQLite3 REQUIRED)
if (SQLITE3_FOUND)
include_directories(${SQLITE3_INCLUDE_DIRS})
target_link_libraries (SQLiteCpp ${SQLITE3_LIBRARIES})
endif (SQLITE3_FOUND)
endif (SQLITECPP_INTERNAL_SQLITE)

# Optional additional targets:
Expand Down

0 comments on commit 11fab0f

Please sign in to comment.