2012-06-26 14:40:26 +02:00
|
|
|
# POCO_BUILD_TYPE
|
|
|
|
# POCO_STATIC
|
|
|
|
# POCO_UNBUNDLED
|
|
|
|
# POCO_NO_LOCALE
|
2014-08-22 17:01:09 +02:00
|
|
|
#
|
|
|
|
# ENABLE_{COMPONENT}
|
|
|
|
# ENABLE_TESTS
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2017-09-27 18:51:43 +02:00
|
|
|
cmake_minimum_required(VERSION 3.2.0)
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2015-09-26 11:11:23 +02:00
|
|
|
project(Poco)
|
|
|
|
|
2017-09-27 17:00:49 +02:00
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
|
|
|
2015-09-26 11:11:23 +02:00
|
|
|
file(STRINGS "${PROJECT_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-06-24 12:23:50 +02:00
|
|
|
# Read the version information from the VERSION file
|
2016-12-31 13:14:18 +01:00
|
|
|
file(STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION)
|
2014-06-24 12:23:50 +02:00
|
|
|
message(STATUS "Poco package version: ${PACKAGE_VERSION}")
|
2015-02-04 04:46:25 +01:00
|
|
|
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})
|
2014-06-24 12:23:50 +02:00
|
|
|
|
2014-07-09 15:34:50 +02:00
|
|
|
set(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
|
|
|
set(RELEASE_NAME "Unstable-trunk")
|
|
|
|
set(PROJECT_VERSION ${COMPLETE_VERSION})
|
2017-10-24 20:52:12 +02:00
|
|
|
set(CMAKE_C_STANDARD 99)
|
2012-06-26 14:40:26 +02:00
|
|
|
|
|
|
|
# Put the libaries and binaries that get built into directories at the
|
|
|
|
# top of the build tree rather than in hard-to-find leaf
|
|
|
|
# directories. This simplifies manual testing and the use of the build
|
|
|
|
# tree rather than installed Boost libraries.
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
2014-07-11 20:44:49 +02:00
|
|
|
# Windows DLLs are "runtime" for CMake. Output them to "bin" like the Visual Studio projects do.
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2012-12-16 03:40:40 +01:00
|
|
|
# Append our module directory to CMake
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|
|
|
|
2015-09-26 11:11:23 +02:00
|
|
|
# COMMENT REPLACED BY BIICODE
|
|
|
|
|
2012-06-26 14:40:26 +02:00
|
|
|
#################################################################################
|
|
|
|
# Setup C/C++ compiler options
|
|
|
|
#################################################################################
|
|
|
|
|
2017-10-24 20:52:12 +02:00
|
|
|
option(DISABLE_CPP11 "Disable C++11 if available" OFF)
|
|
|
|
option(DISABLE_CPP14 "Disable C++14 if available" OFF)
|
|
|
|
|
|
|
|
if (DISABLE_CPP11 OR DISABLE_CPP14)
|
|
|
|
add_definitions(-DPOCO_DISABLE_CPP11)
|
|
|
|
|
|
|
|
if (DISABLE_CPP14)
|
|
|
|
add_definitions(-DPOCO_DISABLE_CPP14)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
# C++11/14 compiler flags
|
|
|
|
include(CXX1x)
|
|
|
|
check_for_cxx11_compiler(CXX11_COMPILER)
|
|
|
|
|
|
|
|
# If a C++11 compiler is available, then set the appropriate flags
|
|
|
|
if(CXX11_COMPILER)
|
|
|
|
enable_cxx11()
|
|
|
|
check_for_cxx14_compiler(CXX14_COMPILER)
|
|
|
|
|
|
|
|
# If a C++14 compiler is available, then set the appropriate flags
|
|
|
|
if(CXX14_COMPILER)
|
|
|
|
enable_cxx14()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2012-06-26 14:40:26 +02:00
|
|
|
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()
|
|
|
|
|
2016-12-31 13:14:18 +01:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "")
|
|
|
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
2015-09-26 11:11:23 +02:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-08-22 17:01:09 +02:00
|
|
|
# Include some common macros to simpilfy the Poco CMake files
|
|
|
|
include(PocoMacros)
|
|
|
|
|
|
|
|
# Allow enabling and disabling components
|
2018-02-14 10:25:27 +01:00
|
|
|
option(ENABLE_ENCODINGS "Enable Encodings" ON)
|
2018-02-14 12:11:37 +01:00
|
|
|
option(ENABLE_ENCODINGS_COMPILER "Enable Encodings Compiler" OFF)
|
2018-02-14 10:25:27 +01:00
|
|
|
option(ENABLE_XML "Enable XML" ON)
|
|
|
|
option(ENABLE_JSON "Enable JSON" ON)
|
2014-08-22 17:01:09 +02:00
|
|
|
option(ENABLE_MONGODB "Enable MongoDB" ON)
|
2017-11-10 12:25:53 +01:00
|
|
|
option(ENABLE_REDIS "Enable Redis" ON)
|
2014-12-22 00:06:53 +01:00
|
|
|
option(ENABLE_PDF "Enable PDF" OFF)
|
2014-08-22 17:01:09 +02:00
|
|
|
option(ENABLE_UTIL "Enable Util" ON)
|
|
|
|
option(ENABLE_NET "Enable Net" ON)
|
|
|
|
option(ENABLE_NETSSL "Enable NetSSL" ON)
|
2014-12-22 00:06:53 +01:00
|
|
|
option(ENABLE_NETSSL_WIN "Enable NetSSL Windows" OFF)
|
2014-08-22 17:01:09 +02:00
|
|
|
option(ENABLE_CRYPTO "Enable Crypto" ON)
|
|
|
|
option(ENABLE_DATA "Enable Data" ON)
|
2014-10-09 13:42:51 +02:00
|
|
|
option(ENABLE_DATA_SQLITE "Enable Data SQlite" ON)
|
|
|
|
option(ENABLE_DATA_MYSQL "Enable Data MySQL" ON)
|
2018-05-07 18:50:39 +02:00
|
|
|
option(ENABLE_DATA_POSTGRESQL "Enable Data PostgreSQL" ON)
|
2014-10-09 13:42:51 +02:00
|
|
|
option(ENABLE_DATA_ODBC "Enable Data ODBC" ON)
|
2014-12-22 00:06:53 +01:00
|
|
|
option(ENABLE_SEVENZIP "Enable SevenZip" OFF)
|
2014-08-22 17:01:09 +02:00
|
|
|
option(ENABLE_ZIP "Enable Zip" ON)
|
2014-12-22 00:06:53 +01:00
|
|
|
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
|
|
|
option(ENABLE_CPPPARSER "Enable C++ parser" OFF)
|
|
|
|
option(ENABLE_POCODOC "Enable Poco Documentation Generator" OFF)
|
2014-12-21 21:54:02 +01:00
|
|
|
option(ENABLE_PAGECOMPILER "Enable PageCompiler" ON)
|
|
|
|
option(ENABLE_PAGECOMPILER_FILE2PAGE "Enable File2Page" ON)
|
2014-08-22 17:01:09 +02:00
|
|
|
|
2014-10-09 13:42:51 +02:00
|
|
|
option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF)
|
|
|
|
|
2012-06-26 14:40:26 +02:00
|
|
|
option(ENABLE_TESTS
|
|
|
|
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
|
|
|
|
|
|
|
option(POCO_STATIC
|
|
|
|
"Set to OFF|ON (default is OFF) to control build of POCO as STATIC library" OFF)
|
|
|
|
|
|
|
|
option(POCO_UNBUNDLED
|
|
|
|
"Set to OFF|ON (default is OFF) to control linking dependencies as external" OFF)
|
|
|
|
|
2015-09-26 11:11:23 +02:00
|
|
|
if(MSVC)
|
|
|
|
option(POCO_MT
|
|
|
|
"Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)
|
|
|
|
|
|
|
|
option(ENABLE_MSVC_MP
|
|
|
|
"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
|
2012-06-26 14:40:26 +02:00
|
|
|
if(POCO_STATIC)
|
2016-12-31 13:14:18 +01:00
|
|
|
set(LIB_MODE_DEFINITIONS -DPOCO_STATIC -DPOCO_NO_AUTOMATIC_LIBS)
|
|
|
|
set(LIB_MODE STATIC)
|
2012-06-26 14:40:26 +02:00
|
|
|
message(STATUS "Building static libraries")
|
|
|
|
else(POCO_STATIC)
|
2016-12-31 13:14:18 +01:00
|
|
|
set(LIB_MODE SHARED)
|
|
|
|
set(LIB_MODE_DEFINITIONS -DPOCO_NO_AUTOMATIC_LIBS)
|
2012-06-26 14:40:26 +02:00
|
|
|
message(STATUS "Building dynamic libraries")
|
|
|
|
endif(POCO_STATIC)
|
|
|
|
|
2016-12-31 13:14:18 +01:00
|
|
|
if(ENABLE_TESTS)
|
2018-02-27 01:54:40 +01:00
|
|
|
option(ENABLE_LONG_RUNNING_TESTS "Enable long running test" ON)
|
2012-06-26 14:40:26 +02:00
|
|
|
include(CTest)
|
2014-07-09 15:34:50 +02:00
|
|
|
enable_testing()
|
2012-06-26 14:40:26 +02:00
|
|
|
message(STATUS "Building with unittests & samples")
|
2016-12-31 13:14:18 +01:00
|
|
|
else()
|
2012-06-26 14:40:26 +02:00
|
|
|
message(STATUS "Building without tests & samples")
|
2016-12-31 13:14:18 +01:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2016-12-31 13:14:18 +01:00
|
|
|
if(POCO_UNBUNDLED)
|
|
|
|
add_definitions(-DPOCO_UNBUNDLED)
|
2018-03-07 11:22:34 +01:00
|
|
|
message(STATUS "Using external sqlite, zlib, pcre, expat, ...")
|
2016-12-31 13:14:18 +01:00
|
|
|
else()
|
2018-03-07 11:22:34 +01:00
|
|
|
message(STATUS "Using internal sqlite, zlib, pcre, expat, ...")
|
2016-12-31 13:14:18 +01:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2015-09-26 11:11:23 +02:00
|
|
|
include(DefinePlatformSpecifc)
|
2014-10-09 13:42:51 +02:00
|
|
|
|
|
|
|
# Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file
|
|
|
|
set(Poco_COMPONENTS "")
|
2013-11-01 16:46:20 +01:00
|
|
|
|
2016-12-31 13:14:18 +01:00
|
|
|
if(ENABLE_TESTS)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(CppUnit)
|
2016-12-31 13:14:18 +01:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
|
|
|
|
add_subdirectory(Foundation)
|
2018-02-14 10:25:27 +01:00
|
|
|
if(ENABLE_ENCODINGS)
|
|
|
|
add_subdirectory(Encodings)
|
|
|
|
list(APPEND Poco_COMPONENTS "Encodings")
|
|
|
|
endif()
|
2014-08-22 17:01:09 +02:00
|
|
|
if(ENABLE_XML)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(XML)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "XML")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
|
|
|
if(ENABLE_JSON)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(JSON)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "JSON")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2017-11-10 19:21:55 +01:00
|
|
|
if(ENABLE_UTIL)
|
|
|
|
add_subdirectory(Util)
|
|
|
|
list(APPEND Poco_COMPONENTS "Util")
|
|
|
|
endif()
|
|
|
|
if(ENABLE_NET)
|
|
|
|
add_subdirectory(Net)
|
|
|
|
list(APPEND Poco_COMPONENTS "Net")
|
|
|
|
endif()
|
|
|
|
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/MongoDB AND ENABLE_MONGODB)
|
2013-02-16 20:53:48 +01:00
|
|
|
add_subdirectory(MongoDB)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "MongoDB")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
|
2017-11-10 12:25:53 +01:00
|
|
|
add_subdirectory(Redis)
|
|
|
|
list(APPEND Poco_COMPONENTS "Redis")
|
|
|
|
endif()
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(PDF)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "PDF")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-10-09 13:42:51 +02:00
|
|
|
|
|
|
|
#NetSSL
|
|
|
|
|
|
|
|
|
2017-11-10 21:35:25 +01:00
|
|
|
if(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
2014-10-09 13:42:51 +02:00
|
|
|
add_subdirectory(NetSSL_Win)
|
|
|
|
list(APPEND Poco_COMPONENTS "NetSSL_Win")
|
2017-11-10 21:35:25 +01:00
|
|
|
endif(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN)
|
2014-10-09 13:42:51 +02:00
|
|
|
|
2014-07-09 15:34:50 +02:00
|
|
|
find_package(OpenSSL)
|
2012-06-26 14:40:26 +02:00
|
|
|
if(OPENSSL_FOUND)
|
2014-08-22 17:01:09 +02:00
|
|
|
include_directories("${OPENSSL_INCLUDE_DIR}")
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_OpenSSL AND ENABLE_NETSSL)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(NetSSL_OpenSSL)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(Crypto)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "Crypto")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
endif(OPENSSL_FOUND)
|
|
|
|
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Data AND ENABLE_DATA)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(Data)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "Data")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP)
|
2014-07-09 15:34:50 +02:00
|
|
|
add_subdirectory(SevenZip)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "SevenZip")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(Zip)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "Zip")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-08-22 17:01:09 +02:00
|
|
|
find_package(APR)
|
|
|
|
find_package(Apache2)
|
2012-06-26 14:40:26 +02:00
|
|
|
if(APRUTIL_FOUND AND APACHE_FOUND)
|
2014-08-22 17:01:09 +02:00
|
|
|
include_directories( "${APACHE_INCLUDE_DIR}" "${APRUTIL_INCLUDE_DIR}" )
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR)
|
2012-06-26 14:40:26 +02:00
|
|
|
add_subdirectory(ApacheConnector)
|
2014-10-09 13:42:51 +02:00
|
|
|
list(APPEND Poco_COMPONENTS "ApacheConnector")
|
2014-08-22 17:01:09 +02:00
|
|
|
endif()
|
2012-06-26 14:40:26 +02:00
|
|
|
endif(APRUTIL_FOUND AND APACHE_FOUND)
|
|
|
|
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/CppParser AND ENABLE_CPPPARSER)
|
2014-12-11 10:17:08 +01:00
|
|
|
add_subdirectory(CppParser)
|
|
|
|
list(APPEND Poco_COMPONENTS "CppParser")
|
|
|
|
endif()
|
|
|
|
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PocoDoc AND ENABLE_POCODOC)
|
2014-12-11 10:31:13 +01:00
|
|
|
add_subdirectory(PocoDoc)
|
|
|
|
list(APPEND Poco_COMPONENTS "PocoDoc")
|
|
|
|
endif()
|
|
|
|
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler AND ENABLE_PAGECOMPILER)
|
2014-12-21 21:54:02 +01:00
|
|
|
add_subdirectory(PageCompiler)
|
|
|
|
list(APPEND Poco_COMPONENTS "PageCompiler")
|
|
|
|
endif()
|
|
|
|
|
2017-11-10 21:35:25 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE)
|
2014-12-21 21:54:02 +01:00
|
|
|
add_subdirectory(PageCompiler/File2Page)
|
|
|
|
list(APPEND Poco_COMPONENTS "File2Page")
|
|
|
|
endif()
|
|
|
|
|
2018-02-14 12:11:37 +01:00
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/Encodings/Compiler AND ENABLE_ENCODINGS_COMPILER)
|
|
|
|
add_subdirectory(Encodings/Compiler)
|
|
|
|
list(APPEND Poco_COMPONENTS "EncodingsCompiler")
|
|
|
|
endif()
|
|
|
|
|
2017-11-10 19:21:55 +01:00
|
|
|
|
2012-06-26 14:40:26 +02:00
|
|
|
#############################################################
|
|
|
|
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
|
2014-07-09 15:34:50 +02:00
|
|
|
configure_file(
|
2013-11-01 16:50:30 +01:00
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
2012-06-26 14:40:26 +02:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
2014-07-09 15:34:50 +02:00
|
|
|
add_custom_target(uninstall
|
2012-06-26 14:40:26 +02:00
|
|
|
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
# Enable packaging
|
|
|
|
|
2014-07-09 15:34:50 +02:00
|
|
|
include(InstallRequiredSystemLibraries)
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-07-09 15:34:50 +02:00
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Poco Libraries")
|
|
|
|
set(CPACK_PACKAGE_VENDOR "Applied Informatics Software Engineering GmbH")
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
|
|
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/local")
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-07-09 15:34:50 +02:00
|
|
|
include(CPack)
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-10-09 13:42:51 +02:00
|
|
|
#############################################################
|
2017-11-10 12:25:53 +01:00
|
|
|
# cmake config files
|
2014-10-09 13:42:51 +02:00
|
|
|
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
write_basic_package_version_file(
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
|
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
COMPATIBILITY AnyNewerVersion
|
|
|
|
)
|
|
|
|
|
|
|
|
configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY)
|
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake
|
|
|
|
DESTINATION
|
2018-02-14 15:13:46 +01:00
|
|
|
"lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}"
|
2014-10-09 13:42:51 +02:00
|
|
|
COMPONENT
|
|
|
|
Devel
|
|
|
|
)
|
|
|
|
|
|
|
|
# in tree build settings
|
|
|
|
#configure_file(PocoBuildTreeSettings.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/PocoBuildTreeSettings.cmake @ONLY)
|
|
|
|
|
|
|
|
|
2012-06-26 14:40:26 +02:00
|
|
|
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
|
|
|
message(STATUS "Installation target path: ${CMAKE_INSTALL_PREFIX}")
|
|
|
|
|
|
|
|
message(STATUS "C_FLAGS: =${CMAKE_C_FLAGS}")
|
2015-09-26 11:11:23 +02:00
|
|
|
message(STATUS "CMAKE_C_FLAGS_DEBUG:=${CMAKE_C_FLAGS_DEBUG}")
|
|
|
|
message(STATUS "CMAKE_C_FLAGS_RELEASE:=${CMAKE_C_FLAGS_RELEASE}")
|
|
|
|
message(STATUS "CMAKE_C_FLAGS_MINSIZEREL:=${CMAKE_C_FLAGS_MINSIZEREL}")
|
|
|
|
message(STATUS "CMAKE_C_FLAGS_RELWITHDEBINFO:=${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
|
|
|
message(STATUS "")
|
|
|
|
message(STATUS "")
|
2012-06-26 14:40:26 +02:00
|
|
|
message(STATUS "CXX_FLAGS:=${CMAKE_CXX_FLAGS}")
|
2015-09-26 11:11:23 +02:00
|
|
|
message(STATUS "CMAKE_CXX_FLAGS_DEBUG:=${CMAKE_CXX_FLAGS_DEBUG}")
|
|
|
|
message(STATUS "CMAKE_CXX_FLAGS_RELEASE:=${CMAKE_CXX_FLAGS_RELEASE}")
|
|
|
|
message(STATUS "CMAKE_CXX_FLAGS_MINSIZEREL:=${CMAKE_CXX_FLAGS_MINSIZEREL}")
|
|
|
|
message(STATUS "CMAKE_CXX_FLAGS_RELWITHDEBINFO:=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
2012-06-26 14:40:26 +02:00
|
|
|
|
2014-10-09 13:42:51 +02:00
|
|
|
foreach(component ${Poco_COMPONENTS})
|
|
|
|
message(STATUS "Building: ${component}")
|
|
|
|
endforeach()
|
|
|
|
|