2017-11-08 15:48:04 +01:00
|
|
|
# Sources
|
|
|
|
file(GLOB SRCS_G "src/*.cpp")
|
2020-02-14 11:07:32 +01:00
|
|
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
2017-11-08 15:48:04 +01:00
|
|
|
|
|
|
|
# Headers
|
2020-02-14 11:07:32 +01:00
|
|
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
|
|
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
2017-11-08 15:48:04 +01:00
|
|
|
|
2019-06-24 15:39:06 +02:00
|
|
|
# Version Resource
|
2020-02-12 22:10:01 +01:00
|
|
|
if(MSVC AND BUILD_SHARED_LIBS)
|
2020-02-14 11:07:32 +01:00
|
|
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
|
|
|
list(APPEND SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
2019-06-24 15:39:06 +02:00
|
|
|
endif()
|
|
|
|
|
2020-02-14 11:07:32 +01:00
|
|
|
add_library(Redis ${SRCS})
|
2018-06-03 18:17:50 +02:00
|
|
|
add_library(Poco::Redis ALIAS Redis)
|
|
|
|
set_target_properties(Redis
|
2020-02-14 11:07:32 +01:00
|
|
|
PROPERTIES
|
|
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
2018-06-03 18:17:50 +02:00
|
|
|
OUTPUT_NAME PocoRedis
|
2020-02-14 11:07:32 +01:00
|
|
|
DEFINE_SYMBOL Redis_EXPORTS
|
|
|
|
)
|
2017-11-08 15:48:04 +01:00
|
|
|
|
2018-06-03 18:17:50 +02:00
|
|
|
target_link_libraries(Redis PUBLIC Poco::Net)
|
|
|
|
target_include_directories(Redis
|
2020-02-14 11:07:32 +01:00
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
2020-09-18 02:18:08 +02:00
|
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
2020-02-14 11:07:32 +01:00
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
|
|
)
|
2017-11-08 15:48:04 +01:00
|
|
|
|
2018-06-03 18:17:50 +02:00
|
|
|
POCO_INSTALL(Redis)
|
|
|
|
POCO_GENERATE_PACKAGE(Redis)
|
2017-11-08 15:48:04 +01:00
|
|
|
|
2020-02-14 11:07:32 +01:00
|
|
|
if(ENABLE_TESTS)
|
|
|
|
add_subdirectory(testsuite)
|
|
|
|
# add_subdirectory(samples)
|
|
|
|
endif()
|
2017-11-08 15:48:04 +01:00
|
|
|
|