Switched to CMakeLists.txt per directory but most detecting is still done in

global one. Includes and libraries are properly propagated using
PUBLIC/INTERFACE so we do not have to repeat dependencies.
This commit is contained in:
Eelke Klein 2017-08-27 13:25:16 +02:00
parent 7c4e8e95e8
commit f32b7370dc
6 changed files with 216 additions and 138 deletions

22
src/pgsql/CMakeLists.txt Normal file
View file

@ -0,0 +1,22 @@
add_library(pgsql STATIC
Pgsql_Connection.cpp
Pgsql_Params.cpp
Pgsql_Result.cpp
Pgsql_Row.cpp
Pgsql_Value.cpp)
target_link_libraries(pgsql PUBLIC
postgresql
Qt5::Core
)
target_include_directories(pgsql INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
set_target_properties(pgsql PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
POSITION_INDEPENDENT_CODE True
)