diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d18601..7aded33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,11 +225,11 @@ if (SQLITECPP_INTERNAL_SQLITE) message(STATUS "Compile sqlite3 from source in subdirectory") # build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package add_subdirectory(sqlite3) - target_link_libraries(SQLiteCpp PRIVATE SQLite::SQLite3) + target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3) else (SQLITECPP_INTERNAL_SQLITE) find_package (SQLite3 REQUIRED) 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") set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT") endif() @@ -339,7 +339,7 @@ option(SQLITECPP_BUILD_TESTS "Build and run tests." OFF) if (SQLITECPP_BUILD_TESTS) # add the unit test executable add_executable(SQLiteCpp_tests ${SQLITECPP_TESTS}) - target_link_libraries(SQLiteCpp_tests SQLiteCpp SQLite::SQLite3) + target_link_libraries(SQLiteCpp_tests SQLiteCpp) find_package(GTest) if (GTEST_FOUND)