mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-10-29 09:42:31 +00:00
Cleanup cmake build system to use transitive dependency management from cmake (#2321)
* Some cleanup in the root CMakeLists.txt
* Cleanup cmake targets
* Add find openssl modul for older cmake version
* Set proper scope
* Change crypto default to off
* Fix openssl default to on
* Remove global setting of C99 standard
* Set from C11 to C99
* Fix for NetSSL win build
* Set C99 compile features
* Fix Windows build
* Fix windows build
* Cleanup poco unbundle definition
* Fix PDF build
* Remove unused set affinity
* Add _CRT_SECURE_NO_WARNINGS as target compile definitions
* Add _AFXDLL as target compile definitions
* Remove commented out line
* Refactor add_definitions to target_compile_definitons in Util
* Refactor add_definitions to target_compile_definitons in XML
* Remove THREADSAFE in data sql cmake build
* Refactor add_definitions to target_compile_definition in cmake mysql
* Refactor add_definitions to target_compile_definition in cmake odbc
* Refactor add_definitions to target_compile_definition in cmake sqlite
* Refactor add_definitions to target_compile_definitions in platform specific cmake
* Add _DEBUG as compile definition
* Add build dependencies between Foundation-testrunner and TestApp, TestLibrary in cmake build
* Use cmake property to build shared libs
* Cleanup POCO_NO_AUTOMATIC_LIBS. Set only for Windows in cmake build system
* cleanup LIB_MODE_DEFINITIONS in cmake buld system
* Add POCO_STATIC for CppUnit
* Cleanup target link libraries and add option dependencies.
* Add dependencies management in cmake
* Update cmake documentation
* Squashed commit of the following:
commit 38c233f93fc8e9ad6e24d686c905eb18c86e19a7
Fix "invalid new-expression of abstract class type ApacheServerRequest" (#2231)
- abstract method "bool secure() const" defined in HTTPServerRequest was implemented in ApacheServerRequest, one of its derived classes
- a ap_log_error had one of its parameters changed for fixing a warning "passing NULL to non-pointer argument"
- minor indentation problems corrected
commit 4cbdfbe828943871618172f9e042176f115d61d8
Fix build dependencies
* Improve database cmake build dependencies
* Update doc
* Update doc
* Update cmake build commands
* Set public on target link libraries in cmake build system
* Fix PostgreSQL build
* Fix PostgreSQL build in cmake
* Fix PostgreSQL from SQL to Data
* Squashed commit of the following:
commit 1ba7d5dcbfb8d07860dd4efda33b31bedf6184c4
Add missing cmake file
* Set path to PostgresSQL in AppVoyer
* Try to fix AppVeyor build
* show dir in appvoyer
* Disable PostgreSQL build on Appvoyer
* Refactor add_definitions to target_compile_definitions
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
4542a15b86
commit
612f092235
321
CMakeLists.txt
321
CMakeLists.txt
@@ -1,30 +1,18 @@
|
||||
# POCO_BUILD_TYPE
|
||||
# POCO_STATIC
|
||||
# POCO_UNBUNDLED
|
||||
# POCO_NO_LOCALE
|
||||
#
|
||||
# ENABLE_{COMPONENT}
|
||||
# ENABLE_TESTS
|
||||
|
||||
cmake_minimum_required(VERSION 3.2.0)
|
||||
|
||||
project(Poco)
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
file(STRINGS "${PROJECT_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
||||
|
||||
# Read the version information from the VERSION file
|
||||
file(STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION)
|
||||
message(STATUS "Poco package version: ${PACKAGE_VERSION}")
|
||||
file (STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION )
|
||||
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
||||
|
||||
set(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
set(PROJECT_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
set(RELEASE_NAME "Unstable-trunk")
|
||||
set(PROJECT_VERSION ${COMPLETE_VERSION})
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
message(STATUS "Poco package version: ${PROJECT_VERSION}")
|
||||
|
||||
# Put the libaries and binaries that get built into directories at the
|
||||
# top of the build tree rather than in hard-to-find leaf
|
||||
@@ -36,14 +24,14 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
# Append our module directory to CMake
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# COMMENT REPLACED BY BIICODE
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.4")
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/V33)
|
||||
endif()
|
||||
#################################################################################
|
||||
# Setup C/C++ compiler options
|
||||
#################################################################################
|
||||
|
||||
option(DISABLE_CPP11 "Disable C++11 if available" OFF)
|
||||
option(DISABLE_CPP14 "Disable C++14 if available" OFF)
|
||||
|
||||
@@ -70,42 +58,99 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT MSVC_IDE)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||
"Choose the type of build, options are: None Debug Release" FORCE)
|
||||
endif()
|
||||
message(STATUS "Setting Poco build type - ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "")
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
message(STATUS "Setting Poco build type - ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
# Include some common macros to simpilfy the Poco CMake files
|
||||
include(PocoMacros)
|
||||
|
||||
if(ENABLE_CRYPTO OR ENABLE_NETSSL)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
else()
|
||||
find_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
option(ENABLE_NETSSL "Enable NetSSL" ON)
|
||||
option(ENABLE_CRYPTO "Enable Crypto" ON)
|
||||
else()
|
||||
option(ENABLE_NETSSL "Enable NetSSL" OFF)
|
||||
option(ENABLE_CRYPTO "Enable Crypto" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_APACHECONNECTOR)
|
||||
find_package(APR REQUIRED)
|
||||
find_package(Apache2 REQUIRED)
|
||||
else()
|
||||
find_package(APR)
|
||||
find_package(Apache2)
|
||||
endif()
|
||||
|
||||
if(APRUTIL_FOUND AND APACHE_FOUND AND
|
||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON)
|
||||
else()
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_MYSQL)
|
||||
find_package(MySQL REQUIRED)
|
||||
else()
|
||||
find_package(MySQL)
|
||||
endif()
|
||||
|
||||
if(MYSQL_FOUND)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL" ON)
|
||||
else()
|
||||
option(ENABLE_DATA "Enable Data" OFF)
|
||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_POSTGRESQL)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
else()
|
||||
find_package(PostgreSQL QUIET)
|
||||
endif()
|
||||
|
||||
if(POSTGRESQL_FOUND)
|
||||
option(ENABLE_DATA "Enable SQL" ON)
|
||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" ON)
|
||||
else()
|
||||
option(ENABLE_DATA "Enable SQL" OFF)
|
||||
option(ENABLE_DATA_POSTGRESQL "Enable SQL PosgreSQL" OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_ODBC)
|
||||
find_package(ODBC REQUIRED)
|
||||
else()
|
||||
find_package(ODBC)
|
||||
endif()
|
||||
|
||||
if(ODBC_FOUND)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
||||
else()
|
||||
option(ENABLE_DATA "Enable Data" OFF)
|
||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" OFF)
|
||||
endif()
|
||||
|
||||
# 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)
|
||||
option(ENABLE_DATA_SQLITE "Enable Data SQlite" ON)
|
||||
option(ENABLE_REDIS "Enable Redis" ON)
|
||||
option(ENABLE_PDF "Enable PDF" OFF)
|
||||
option(ENABLE_UTIL "Enable Util" ON)
|
||||
option(ENABLE_NET "Enable Net" ON)
|
||||
option(ENABLE_NETSSL "Enable NetSSL" ON)
|
||||
option(ENABLE_NETSSL_WIN "Enable NetSSL Windows" OFF)
|
||||
option(ENABLE_CRYPTO "Enable Crypto" ON)
|
||||
option(ENABLE_DATA "Enable Data" ON)
|
||||
option(ENABLE_DATA_SQLITE "Enable Data SQlite" ON)
|
||||
option(ENABLE_DATA_MYSQL "Enable Data MySQL" ON)
|
||||
option(ENABLE_DATA_POSTGRESQL "Enable Data PostgreSQL" ON)
|
||||
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
||||
option(ENABLE_SEVENZIP "Enable SevenZip" OFF)
|
||||
option(ENABLE_ZIP "Enable Zip" ON)
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
||||
option(ENABLE_CPPPARSER "Enable C++ parser" OFF)
|
||||
option(ENABLE_POCODOC "Enable Poco Documentation Generator" OFF)
|
||||
option(ENABLE_PAGECOMPILER "Enable PageCompiler" ON)
|
||||
@@ -118,6 +163,13 @@ option(ENABLE_TESTS
|
||||
|
||||
option(POCO_STATIC
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO as STATIC library" OFF)
|
||||
if(POCO_STATIC)
|
||||
message(STATUS "Building static libraries")
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
else()
|
||||
message(STATUS "Building dynamic libraries")
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
endif()
|
||||
|
||||
option(POCO_UNBUNDLED
|
||||
"Set to OFF|ON (default is OFF) to control linking dependencies as external" OFF)
|
||||
@@ -130,16 +182,6 @@ if(MSVC)
|
||||
"Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC" OFF)
|
||||
endif()
|
||||
|
||||
# Uncomment from next two lines to force static or dynamic library, default is autodetection
|
||||
if(POCO_STATIC)
|
||||
set(LIB_MODE_DEFINITIONS -DPOCO_STATIC -DPOCO_NO_AUTOMATIC_LIBS)
|
||||
set(LIB_MODE STATIC)
|
||||
message(STATUS "Building static libraries")
|
||||
else(POCO_STATIC)
|
||||
set(LIB_MODE SHARED)
|
||||
set(LIB_MODE_DEFINITIONS -DPOCO_NO_AUTOMATIC_LIBS)
|
||||
message(STATUS "Building dynamic libraries")
|
||||
endif(POCO_STATIC)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
option(ENABLE_LONG_RUNNING_TESTS "Enable long running test" ON)
|
||||
@@ -151,7 +193,6 @@ else()
|
||||
endif()
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
add_definitions(-DPOCO_UNBUNDLED)
|
||||
message(STATUS "Using external sqlite, zlib, pcre, expat, ...")
|
||||
else()
|
||||
message(STATUS "Using internal sqlite, zlib, pcre, expat, ...")
|
||||
@@ -164,41 +205,127 @@ set(Poco_COMPONENTS "")
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(CppUnit)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE )
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
|
||||
if(ENABLE_ZIP)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_ENCODINGS_COMPILER OR ENABLE_APACHECONNECTOR)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PAGECOMPILER_FILE2PAGE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PAGECOMPILER)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_MONGODB OR ENABLE_REDIS)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_SQLITE OR ENABLE_DATA_MYSQL OR ENABLE_DATA_ODBC OR ENABLE_DATA_POSTGRESQL)
|
||||
set(ENABLE_DATA ON CACHE BOOL "Enable Data" FORCE)
|
||||
if(ENABLE_TESTS)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA AND ENABLE_TESTS)
|
||||
set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQlite" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_NETSSL_WIN)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
if(ENABLE_TESTS)
|
||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_NETSSL)
|
||||
set(ENABLE_CRYPTO ON CACHE BOOL "Enable Crypto" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CRYPTO AND ENABLE_TESTS)
|
||||
set(ENABLE_NETSSL ON CACHE BOOL "Enable NetSSL" FORCE)
|
||||
set(ENABLE_NET ON CACHE BOOL "Enable Net" FORCE)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_NET AND ENABLE_TESTS)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PDF)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_POCODOC)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
set(ENABLE_CPPPARSER ON CACHE BOOL "Enable C++ parser" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SEVENZIP OR ENABLE_ZIP)
|
||||
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_UTIL AND ENABLE_TESTS)
|
||||
set(ENABLE_JSON ON CACHE BOOL "Enable JSON" FORCE)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
endif()
|
||||
|
||||
add_subdirectory(Foundation)
|
||||
if(ENABLE_ENCODINGS)
|
||||
add_subdirectory(Encodings)
|
||||
list(APPEND Poco_COMPONENTS "Encodings")
|
||||
add_subdirectory(Encodings)
|
||||
list(APPEND Poco_COMPONENTS "Encodings")
|
||||
endif()
|
||||
|
||||
if(ENABLE_XML)
|
||||
add_subdirectory(XML)
|
||||
list(APPEND Poco_COMPONENTS "XML")
|
||||
add_subdirectory(XML)
|
||||
list(APPEND Poco_COMPONENTS "XML")
|
||||
endif()
|
||||
|
||||
if(ENABLE_JSON)
|
||||
add_subdirectory(JSON)
|
||||
list(APPEND Poco_COMPONENTS "JSON")
|
||||
add_subdirectory(JSON)
|
||||
list(APPEND Poco_COMPONENTS "JSON")
|
||||
endif()
|
||||
|
||||
if(ENABLE_UTIL)
|
||||
add_subdirectory(Util)
|
||||
list(APPEND Poco_COMPONENTS "Util")
|
||||
add_subdirectory(Util)
|
||||
list(APPEND Poco_COMPONENTS "Util")
|
||||
endif()
|
||||
|
||||
if(ENABLE_NET)
|
||||
add_subdirectory(Net)
|
||||
list(APPEND Poco_COMPONENTS "Net")
|
||||
add_subdirectory(Net)
|
||||
list(APPEND Poco_COMPONENTS "Net")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/MongoDB AND ENABLE_MONGODB)
|
||||
add_subdirectory(MongoDB)
|
||||
list(APPEND Poco_COMPONENTS "MongoDB")
|
||||
add_subdirectory(MongoDB)
|
||||
list(APPEND Poco_COMPONENTS "MongoDB")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
|
||||
add_subdirectory(Redis)
|
||||
list(APPEND Poco_COMPONENTS "Redis")
|
||||
add_subdirectory(Redis)
|
||||
list(APPEND Poco_COMPONENTS "Redis")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
|
||||
add_subdirectory(PDF)
|
||||
list(APPEND Poco_COMPONENTS "PDF")
|
||||
add_subdirectory(PDF)
|
||||
list(APPEND Poco_COMPONENTS "PDF")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -210,65 +337,62 @@ if(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
||||
list(APPEND Poco_COMPONENTS "NetSSL_Win")
|
||||
endif(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
||||
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
include_directories("${OPENSSL_INCLUDE_DIR}")
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_OpenSSL AND ENABLE_NETSSL)
|
||||
add_subdirectory(NetSSL_OpenSSL)
|
||||
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
|
||||
add_subdirectory(NetSSL_OpenSSL)
|
||||
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
|
||||
endif()
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO)
|
||||
add_subdirectory(Crypto)
|
||||
list(APPEND Poco_COMPONENTS "Crypto")
|
||||
add_subdirectory(Crypto)
|
||||
list(APPEND Poco_COMPONENTS "Crypto")
|
||||
endif()
|
||||
endif(OPENSSL_FOUND)
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Data AND ENABLE_DATA)
|
||||
add_subdirectory(Data)
|
||||
list(APPEND Poco_COMPONENTS "Data")
|
||||
endif()
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP)
|
||||
add_subdirectory(SevenZip)
|
||||
list(APPEND Poco_COMPONENTS "SevenZip")
|
||||
endif()
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP)
|
||||
add_subdirectory(Zip)
|
||||
list(APPEND Poco_COMPONENTS "Zip")
|
||||
add_subdirectory(Data)
|
||||
list(APPEND Poco_COMPONENTS "Data")
|
||||
endif()
|
||||
|
||||
find_package(APR)
|
||||
find_package(Apache2)
|
||||
if(APRUTIL_FOUND AND APACHE_FOUND)
|
||||
include_directories( "${APACHE_INCLUDE_DIR}" "${APRUTIL_INCLUDE_DIR}" )
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP)
|
||||
add_subdirectory(SevenZip)
|
||||
list(APPEND Poco_COMPONENTS "SevenZip")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP)
|
||||
add_subdirectory(Zip)
|
||||
list(APPEND Poco_COMPONENTS "Zip")
|
||||
endif()
|
||||
|
||||
if(APRUTIL_FOUND AND APACHE_FOUND AND
|
||||
EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
||||
include_directories( "${APACHE_INCLUDE_DIR}" "${APRUTIL_INCLUDE_DIR}" ) # TODO(Bjoe) use target_include_directories or target_link_libraries
|
||||
add_subdirectory(ApacheConnector)
|
||||
list(APPEND Poco_COMPONENTS "ApacheConnector")
|
||||
endif()
|
||||
endif(APRUTIL_FOUND AND APACHE_FOUND)
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/CppParser AND ENABLE_CPPPARSER)
|
||||
add_subdirectory(CppParser)
|
||||
list(APPEND Poco_COMPONENTS "CppParser")
|
||||
add_subdirectory(CppParser)
|
||||
list(APPEND Poco_COMPONENTS "CppParser")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PocoDoc AND ENABLE_POCODOC)
|
||||
add_subdirectory(PocoDoc)
|
||||
list(APPEND Poco_COMPONENTS "PocoDoc")
|
||||
add_subdirectory(PocoDoc)
|
||||
list(APPEND Poco_COMPONENTS "PocoDoc")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler AND ENABLE_PAGECOMPILER)
|
||||
add_subdirectory(PageCompiler)
|
||||
list(APPEND Poco_COMPONENTS "PageCompiler")
|
||||
add_subdirectory(PageCompiler)
|
||||
list(APPEND Poco_COMPONENTS "PageCompiler")
|
||||
endif()
|
||||
|
||||
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE)
|
||||
add_subdirectory(PageCompiler/File2Page)
|
||||
list(APPEND Poco_COMPONENTS "File2Page")
|
||||
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")
|
||||
add_subdirectory(Encodings/Compiler)
|
||||
list(APPEND Poco_COMPONENTS "EncodingsCompiler")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -337,6 +461,5 @@ message(STATUS "CMAKE_CXX_FLAGS_MINSIZEREL:=${CMAKE_CXX_FLAGS_MINSIZEREL}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_RELWITHDEBINFO:=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
|
||||
foreach(component ${Poco_COMPONENTS})
|
||||
message(STATUS "Building: ${component}")
|
||||
message(STATUS "Building: ${component}")
|
||||
endforeach()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user