From 6f809f7acbbccdc30ff8b7c5f99c3651b2fe8da6 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Sun, 21 Dec 2014 21:54:02 +0100 Subject: [PATCH] CMake: Add support for PageCompiler and File2Page Resolves: #649 --- CMakeLists.txt | 12 ++++++++++++ PageCompiler/CMakeLists.txt | 23 +++++++++++++++++++++++ PageCompiler/File2Page/CMakeLists.txt | 23 +++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 PageCompiler/CMakeLists.txt create mode 100644 PageCompiler/File2Page/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 0013871a7..a8e7bab13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,8 @@ option(ENABLE_ZIP "Enable Zip" ON) option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON) option(ENABLE_CPPPARSER "Enable C++ parser" ON) option(ENABLE_POCODOC "Enable Poco Documentation Generator" ON) +option(ENABLE_PAGECOMPILER "Enable PageCompiler" ON) +option(ENABLE_PAGECOMPILER_FILE2PAGE "Enable File2Page" ON) option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF) @@ -261,6 +263,16 @@ add_subdirectory(PocoDoc) list(APPEND Poco_COMPONENTS "PocoDoc") endif() +if(ENABLE_PAGECOMPILER) +add_subdirectory(PageCompiler) +list(APPEND Poco_COMPONENTS "PageCompiler") +endif() + +if(ENABLE_PAGECOMPILER_FILE2PAGE) +add_subdirectory(PageCompiler/File2Page) +list(APPEND Poco_COMPONENTS "File2Page") +endif() + ############################################################# # Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ configure_file( diff --git a/PageCompiler/CMakeLists.txt b/PageCompiler/CMakeLists.txt new file mode 100644 index 000000000..a7a60bb74 --- /dev/null +++ b/PageCompiler/CMakeLists.txt @@ -0,0 +1,23 @@ +set(POCO_EXENAME "PageCompiler") + +# 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 cpspc + ) + +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 + ) + +#POCO_GENERATE_PACKAGE("${LIBNAME}" "${LIBNAME}Targets" "lib/cmake/${PROJECT_NAME}") diff --git a/PageCompiler/File2Page/CMakeLists.txt b/PageCompiler/File2Page/CMakeLists.txt new file mode 100644 index 000000000..9ab634dd8 --- /dev/null +++ b/PageCompiler/File2Page/CMakeLists.txt @@ -0,0 +1,23 @@ +set(POCO_EXENAME "File2Page") + +# 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 f2cpsp + ) + +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 + ) + +#POCO_GENERATE_PACKAGE("${LIBNAME}" "${LIBNAME}Targets" "lib/cmake/${PROJECT_NAME}")