mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Link SQLite3 publicly
This commit is contained in:
parent
fd569f58a6
commit
afa11d94e0
@ -225,11 +225,11 @@ if (SQLITECPP_INTERNAL_SQLITE)
|
|||||||
message(STATUS "Compile sqlite3 from source in subdirectory")
|
message(STATUS "Compile sqlite3 from source in subdirectory")
|
||||||
# build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package
|
# build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package
|
||||||
add_subdirectory(sqlite3)
|
add_subdirectory(sqlite3)
|
||||||
target_link_libraries(SQLiteCpp PRIVATE SQLite::SQLite3)
|
target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
|
||||||
else (SQLITECPP_INTERNAL_SQLITE)
|
else (SQLITECPP_INTERNAL_SQLITE)
|
||||||
find_package (SQLite3 REQUIRED)
|
find_package (SQLite3 REQUIRED)
|
||||||
message(STATUS "Link to sqlite3 system library")
|
message(STATUS "Link to sqlite3 system library")
|
||||||
target_link_libraries(SQLiteCpp PRIVATE SQLite::SQLite3)
|
target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
|
||||||
if(SQLite3_VERSION VERSION_LESS "3.19")
|
if(SQLite3_VERSION VERSION_LESS "3.19")
|
||||||
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
|
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
|
||||||
endif()
|
endif()
|
||||||
@ -339,7 +339,7 @@ option(SQLITECPP_BUILD_TESTS "Build and run tests." OFF)
|
|||||||
if (SQLITECPP_BUILD_TESTS)
|
if (SQLITECPP_BUILD_TESTS)
|
||||||
# add the unit test executable
|
# add the unit test executable
|
||||||
add_executable(SQLiteCpp_tests ${SQLITECPP_TESTS})
|
add_executable(SQLiteCpp_tests ${SQLITECPP_TESTS})
|
||||||
target_link_libraries(SQLiteCpp_tests SQLiteCpp SQLite::SQLite3)
|
target_link_libraries(SQLiteCpp_tests SQLiteCpp)
|
||||||
|
|
||||||
find_package(GTest)
|
find_package(GTest)
|
||||||
if (GTEST_FOUND)
|
if (GTEST_FOUND)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user