diff --git a/CMakeLists.txt b/CMakeLists.txt index 85c1061..ee23417 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,13 +279,6 @@ else (SQLITECPP_INTERNAL_SQLITE) endif() endif (SQLITECPP_INTERNAL_SQLITE) -# Link target with pthread and dl for Unix -if (UNIX) - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - target_link_libraries(SQLiteCpp PUBLIC Threads::Threads ${CMAKE_DL_LIBS}) -endif (UNIX) - # Set includes for target and transitive downstream targets target_include_directories(SQLiteCpp diff --git a/sqlite3/CMakeLists.txt b/sqlite3/CMakeLists.txt index 3cc5101..11fc871 100644 --- a/sqlite3/CMakeLists.txt +++ b/sqlite3/CMakeLists.txt @@ -11,6 +11,13 @@ add_library(sqlite3 sqlite3.h ) +# Link target with pthread and dl for Unix +if (UNIX) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + target_link_libraries(sqlite3 PUBLIC Threads::Threads ${CMAKE_DL_LIBS}) +endif (UNIX) + target_include_directories(sqlite3 PUBLIC $ $)