2018-02-14 08:40:11 +01:00
|
|
|
# Sources
|
|
|
|
file(GLOB SRCS_G "src/*.cpp")
|
2020-02-14 11:07:32 +01:00
|
|
|
POCO_SOURCES(SRCS Encodings ${SRCS_G})
|
2018-02-14 08:40:11 +01:00
|
|
|
|
|
|
|
# Headers
|
2020-02-14 11:07:32 +01:00
|
|
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
|
|
|
POCO_HEADERS(SRCS Encodings ${HDRS_G})
|
2018-02-14 08:40:11 +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(Encodings ${SRCS})
|
2018-06-03 18:17:50 +02:00
|
|
|
add_library(Poco::Encodings ALIAS Encodings)
|
|
|
|
set_target_properties(Encodings
|
2020-02-14 11:07:32 +01:00
|
|
|
PROPERTIES
|
|
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
|
|
|
OUTPUT_NAME PocoEncodings
|
|
|
|
DEFINE_SYMBOL Encodings_EXPORTS
|
|
|
|
)
|
2018-02-14 08:40:11 +01:00
|
|
|
|
2018-06-03 18:17:50 +02:00
|
|
|
target_link_libraries(Encodings PUBLIC Poco::Foundation)
|
|
|
|
target_include_directories(Encodings
|
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
|
|
|
|
)
|
2018-02-14 08:40:11 +01:00
|
|
|
|
2018-06-03 18:17:50 +02:00
|
|
|
POCO_INSTALL(Encodings)
|
|
|
|
POCO_GENERATE_PACKAGE(Encodings)
|
2018-02-14 08:40:11 +01:00
|
|
|
|
2020-02-14 11:07:32 +01:00
|
|
|
if(ENABLE_TESTS)
|
|
|
|
add_subdirectory(samples)
|
|
|
|
add_subdirectory(testsuite)
|
|
|
|
endif()
|