2014-08-22 17:10:24 +02:00
|
|
|
# Sources
|
|
|
|
file(GLOB SRCS_G "src/*.cpp")
|
2020-02-14 11:07:32 +01:00
|
|
|
POCO_SOURCES_AUTO(SRCS ${SRCS_G})
|
2014-07-09 15:55:58 +02:00
|
|
|
|
2014-08-22 17:10:24 +02:00
|
|
|
# Headers
|
2020-02-14 11:07:32 +01:00
|
|
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
|
|
|
POCO_HEADERS_AUTO(SRCS ${HDRS_G})
|
2012-11-11 11:28:44 +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(NetSSL ${SRCS})
|
2018-06-03 18:17:50 +02:00
|
|
|
add_library(Poco::NetSSL ALIAS NetSSL)
|
2020-02-14 11:07:32 +01:00
|
|
|
set_target_properties(NetSSL
|
|
|
|
PROPERTIES
|
|
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
2018-06-03 18:17:50 +02:00
|
|
|
OUTPUT_NAME PocoNetSSL
|
2020-02-14 11:07:32 +01:00
|
|
|
DEFINE_SYMBOL NetSSL_EXPORTS
|
|
|
|
)
|
2012-11-11 11:28:44 +01:00
|
|
|
|
2019-09-02 11:48:01 +02:00
|
|
|
target_link_libraries(NetSSL PUBLIC Poco::Crypto Poco::Util Poco::Net)
|
2018-06-03 18:17:50 +02:00
|
|
|
target_include_directories(NetSSL
|
2020-02-14 11:07:32 +01:00
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
|
|
$<INSTALL_INTERFACE:include>
|
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
|
|
)
|
2012-11-11 11:28:44 +01:00
|
|
|
|
2019-09-02 11:48:01 +02:00
|
|
|
if(MSVC AND POCO_DISABLE_INTERNAL_OPENSSL AND OPENSSL_USE_STATIC_LIBS)
|
2020-02-14 11:07:32 +01:00
|
|
|
target_link_libraries(NetSSL PUBLIC ws2_32.lib Crypt32.lib)
|
2019-09-02 11:48:01 +02:00
|
|
|
endif()
|
|
|
|
|
2018-06-03 18:17:50 +02:00
|
|
|
POCO_INSTALL(NetSSL)
|
|
|
|
POCO_GENERATE_PACKAGE(NetSSL)
|
2014-10-09 13:42:51 +02:00
|
|
|
|
2020-02-14 11:07:32 +01:00
|
|
|
if(ENABLE_TESTS)
|
|
|
|
add_subdirectory(samples)
|
|
|
|
add_subdirectory(testsuite)
|
|
|
|
endif()
|
2012-11-11 11:28:44 +01:00
|
|
|
|