2018-05-07 17:28:38 +02:00
|
|
|
# Sources
|
|
|
|
file(GLOB SRCS_G "src/*.cpp")
|
|
|
|
POCO_SOURCES_AUTO( POSTGRESQL_SRCS ${SRCS_G})
|
|
|
|
|
|
|
|
# Headers
|
|
|
|
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
|
|
|
POCO_HEADERS_AUTO( POSTGRESQL_SRCS ${HDRS_G})
|
|
|
|
|
2019-06-24 15:39:06 +02:00
|
|
|
# Version Resource
|
|
|
|
if(MSVC AND NOT POCO_STATIC)
|
2019-10-18 15:35:02 +02:00
|
|
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
|
|
|
list(APPEND POSTGRESQL_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
2019-06-24 15:39:06 +02:00
|
|
|
endif()
|
|
|
|
|
2018-06-03 18:17:50 +02:00
|
|
|
add_library(DataPostgreSQL ${POSTGRESQL_SRCS} )
|
|
|
|
add_library(Poco::DataPostgreSQL ALIAS DataPostgreSQL)
|
|
|
|
set_target_properties(DataPostgreSQL
|
2018-05-07 17:28:38 +02:00
|
|
|
PROPERTIES
|
|
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
2018-06-03 18:17:50 +02:00
|
|
|
OUTPUT_NAME PocoDataPostgreSQL
|
2018-05-07 17:28:38 +02:00
|
|
|
DEFINE_SYMBOL PostgreSQL_EXPORTS
|
|
|
|
)
|
|
|
|
|
2018-10-10 13:43:34 +02:00
|
|
|
target_link_libraries(DataPostgreSQL PUBLIC Poco::Data PostgreSQL::client)
|
2018-06-03 18:17:50 +02:00
|
|
|
target_include_directories(DataPostgreSQL
|
2018-05-07 17:28:38 +02:00
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
|
|
$<INSTALL_INTERFACE:include>
|
2018-10-10 13:43:34 +02:00
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
2018-06-03 18:17:50 +02:00
|
|
|
)
|
2018-05-07 17:28:38 +02:00
|
|
|
|
2018-06-03 18:17:50 +02:00
|
|
|
POCO_INSTALL(DataPostgreSQL)
|
|
|
|
POCO_GENERATE_PACKAGE(DataPostgreSQL)
|
2018-05-07 17:28:38 +02:00
|
|
|
|
2018-10-29 13:40:30 +01:00
|
|
|
if (ENABLE_TESTS)
|
2018-05-07 17:28:38 +02:00
|
|
|
add_subdirectory(testsuite)
|
|
|
|
endif ()
|