From 48f0de54ea3c8d8f797e07262bbc0bc5399c6ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Wed, 14 Feb 2018 12:11:37 +0100 Subject: [PATCH] cmake support for EncodingsCompiler --- CMakeLists.txt | 6 ++++++ Encodings/Compiler/CMakeLists.txt | 21 +++++++++++++++++++++ Encodings/Compiler/dependencies | 5 +++++ 3 files changed, 32 insertions(+) create mode 100644 Encodings/Compiler/CMakeLists.txt create mode 100644 Encodings/Compiler/dependencies diff --git a/CMakeLists.txt b/CMakeLists.txt index a1dca4350..0c7456f98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ include(PocoMacros) # Allow enabling and disabling components option(ENABLE_ENCODINGS "Enable Encodings" ON) +option(ENABLE_ENCODINGS_COMPILER "Enable Encodings Compiler" OFF) option(ENABLE_XML "Enable XML" ON) option(ENABLE_JSON "Enable JSON" ON) option(ENABLE_MONGODB "Enable MongoDB" ON) @@ -263,6 +264,11 @@ add_subdirectory(PageCompiler/File2Page) list(APPEND Poco_COMPONENTS "File2Page") 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 diff --git a/Encodings/Compiler/CMakeLists.txt b/Encodings/Compiler/CMakeLists.txt new file mode 100644 index 000000000..ccb99e3bc --- /dev/null +++ b/Encodings/Compiler/CMakeLists.txt @@ -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 + ) diff --git a/Encodings/Compiler/dependencies b/Encodings/Compiler/dependencies new file mode 100644 index 000000000..ac367b3f1 --- /dev/null +++ b/Encodings/Compiler/dependencies @@ -0,0 +1,5 @@ +Net +Util +XML +JSON +Foundation