2020-05-08 14:11:19 +00:00
|
|
|
if (USE_INTERNAL_POCO_LIBRARY)
|
|
|
|
set (SRCS
|
2021-04-24 19:47:52 +00:00
|
|
|
"${LIBRARY_DIR}/Redis/src/Array.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/AsyncReader.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/Client.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/Command.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/Error.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/Exception.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/RedisEventArgs.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/RedisStream.cpp"
|
|
|
|
"${LIBRARY_DIR}/Redis/src/Type.cpp"
|
2020-05-08 14:11:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library (_poco_redis ${SRCS})
|
|
|
|
add_library (Poco::Redis ALIAS _poco_redis)
|
|
|
|
|
|
|
|
if (COMPILER_GCC)
|
2020-05-09 20:30:28 +00:00
|
|
|
target_compile_options (_poco_redis PRIVATE -Wno-deprecated-copy)
|
2020-05-08 14:11:19 +00:00
|
|
|
endif ()
|
2020-05-09 20:30:28 +00:00
|
|
|
target_compile_options (_poco_redis PRIVATE -Wno-shadow)
|
2021-04-24 19:47:52 +00:00
|
|
|
target_include_directories (_poco_redis SYSTEM PUBLIC "${LIBRARY_DIR}/Redis/include")
|
2020-05-08 14:11:19 +00:00
|
|
|
target_link_libraries (_poco_redis PUBLIC Poco::Net)
|
|
|
|
else ()
|
|
|
|
add_library (Poco::Redis UNKNOWN IMPORTED GLOBAL)
|
|
|
|
|
|
|
|
find_library (LIBRARY_POCO_REDIS PocoRedis)
|
|
|
|
find_path (INCLUDE_POCO_REDIS Poco/Redis/Redis.h)
|
|
|
|
set_target_properties (Poco::Redis PROPERTIES IMPORTED_LOCATION ${LIBRARY_POCO_REDIS})
|
|
|
|
set_target_properties (Poco::Redis PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_POCO_REDIS})
|
|
|
|
|
|
|
|
target_link_libraries (Poco::Redis INTERFACE Poco::Net)
|
|
|
|
|
|
|
|
message (STATUS "Using Poco::Redis: ${LIBRARY_POCO_REDIS} ${INCLUDE_POCO_REDIS}")
|
|
|
|
endif ()
|