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:
parent
7c4e8e95e8
commit
f32b7370dc
6 changed files with 216 additions and 138 deletions
22
src/pgsql/CMakeLists.txt
Normal file
22
src/pgsql/CMakeLists.txt
Normal 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
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue