mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-07 03:06:05 -04:00
Merge pull request #334 fix link for HAS_CODEC from linux-fan-dave/master
We only need to link the cipher version of sqlite in case of HAS_CODEC
This commit is contained in:
commit
44bd9c4f38
@ -240,13 +240,6 @@ if (SQLITECPP_INTERNAL_SQLITE)
|
|||||||
add_subdirectory(sqlite3)
|
add_subdirectory(sqlite3)
|
||||||
target_link_libraries(SQLiteCpp PUBLIC sqlite3)
|
target_link_libraries(SQLiteCpp PUBLIC sqlite3)
|
||||||
else (SQLITECPP_INTERNAL_SQLITE)
|
else (SQLITECPP_INTERNAL_SQLITE)
|
||||||
find_package (SQLite3 REQUIRED)
|
|
||||||
message(STATUS "Link to sqlite3 system library")
|
|
||||||
target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
|
|
||||||
if(SQLite3_VERSION VERSION_LESS "3.19")
|
|
||||||
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# When using the SQLite codec, we need to link against the sqlcipher lib & include <sqlcipher/sqlite3.h>
|
# When using the SQLite codec, we need to link against the sqlcipher lib & include <sqlcipher/sqlite3.h>
|
||||||
# So this gets the lib & header, and links/includes everything
|
# So this gets the lib & header, and links/includes everything
|
||||||
if(SQLITE_HAS_CODEC)
|
if(SQLITE_HAS_CODEC)
|
||||||
@ -284,6 +277,13 @@ else (SQLITECPP_INTERNAL_SQLITE)
|
|||||||
target_include_directories(SQLiteCpp PRIVATE "${sqlcipher_INCLUDE_DIR}/sqlcipher")
|
target_include_directories(SQLiteCpp PRIVATE "${sqlcipher_INCLUDE_DIR}/sqlcipher")
|
||||||
target_link_libraries(SQLiteCpp PRIVATE ${sqlcipher_LIBRARY})
|
target_link_libraries(SQLiteCpp PRIVATE ${sqlcipher_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
find_package (SQLite3 REQUIRED)
|
||||||
|
message(STATUS "Link to sqlite3 system library")
|
||||||
|
target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
|
||||||
|
if(SQLite3_VERSION VERSION_LESS "3.19")
|
||||||
|
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif (SQLITECPP_INTERNAL_SQLITE)
|
endif (SQLITECPP_INTERNAL_SQLITE)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user