cmake support for EncodingsCompiler

This commit is contained in:
Günter Obiltschnig 2018-02-14 12:11:37 +01:00
parent c8c552997f
commit 48f0de54ea
3 changed files with 32 additions and 0 deletions

View File

@ -87,6 +87,7 @@ include(PocoMacros)
# Allow enabling and disabling components # Allow enabling and disabling components
option(ENABLE_ENCODINGS "Enable Encodings" ON) option(ENABLE_ENCODINGS "Enable Encodings" ON)
option(ENABLE_ENCODINGS_COMPILER "Enable Encodings Compiler" OFF)
option(ENABLE_XML "Enable XML" ON) option(ENABLE_XML "Enable XML" ON)
option(ENABLE_JSON "Enable JSON" ON) option(ENABLE_JSON "Enable JSON" ON)
option(ENABLE_MONGODB "Enable MongoDB" ON) option(ENABLE_MONGODB "Enable MongoDB" ON)
@ -263,6 +264,11 @@ add_subdirectory(PageCompiler/File2Page)
list(APPEND Poco_COMPONENTS "File2Page") list(APPEND Poco_COMPONENTS "File2Page")
endif() endif()
if(EXISTS ${PROJECT_SOURCE_DIR}/Encodings/Compiler AND ENABLE_ENCODINGS_COMPILER)
add_subdirectory(Encodings/Compiler)
list(APPEND Poco_COMPONENTS "EncodingsCompiler")
endif()
############################################################# #############################################################
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ # Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ

View File

@ -0,0 +1,21 @@
set(POCO_EXENAME "EncodingsCompiler")
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
add_executable( "${POCO_EXENAME}" ${SRCS} )
set_target_properties( "${POCO_EXENAME}"
PROPERTIES
OUTPUT_NAME tec
)
target_link_libraries( "${POCO_EXENAME}" Net Util XML JSON Foundation)
install(
TARGETS "${POCO_EXENAME}" EXPORT "${POCO_EXENAME}Targets"
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)

View File

@ -0,0 +1,5 @@
Net
Util
XML
JSON
Foundation