poco/Encodings/CMakeLists.txt

37 lines
1009 B
CMake
Raw Normal View History

2018-02-14 08:40:11 +01:00
set(LIBNAME "Encodings")
set(POCO_LIBNAME "Poco${LIBNAME}")
# Sources
file(GLOB SRCS_G "src/*.cpp")
2018-02-14 13:27:00 +01:00
POCO_SOURCES( SRCS Encodings ${SRCS_G})
2018-02-14 08:40:11 +01:00
# Headers
file(GLOB_RECURSE HDRS_G "include/*.h" )
2018-02-14 13:27:00 +01:00
POCO_HEADERS( SRCS Encodings ${HDRS_G})
2018-02-14 08:40:11 +01:00
add_library( "${LIBNAME}" ${LIB_MODE} ${SRCS} )
add_library( "${POCO_LIBNAME}" ALIAS "${LIBNAME}")
set_target_properties( "${LIBNAME}"
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME ${POCO_LIBNAME}
DEFINE_SYMBOL Encodings_EXPORTS
)
target_link_libraries( "${LIBNAME}" Foundation)
target_include_directories( "${LIBNAME}"
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_compile_definitions("${LIBNAME}" PUBLIC ${LIB_MODE_DEFINITIONS})
POCO_INSTALL("${LIBNAME}")
POCO_GENERATE_PACKAGE("${LIBNAME}")
if (ENABLE_TESTS)
2018-02-14 15:18:08 +01:00
add_subdirectory(samples)
2018-02-14 08:40:11 +01:00
add_subdirectory(testsuite)
endif ()