summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2017-01-06 12:16:12 -0500
committerAllen Winter <allen.winter@kdab.com>2017-01-06 12:16:12 -0500
commit8eb5cd0be0084e20c6b22620c98207b38b345b71 (patch)
tree47603f9a545547efff4fe4fd622e030d08742cc3 /CMakeLists.txt
parent80dec594735f995e67ff57a1e88223819e93b402 (diff)
downloadlibical-git-8eb5cd0be0084e20c6b22620c98207b38b345b71.tar.gz
buildsystem: setup feature_summary for icu, bdb and python3.
bdb support is built by default if the Berkeley db is found
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 14 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01fc326c..266201a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,11 +7,6 @@
# Build the C++ bindings.
# Default=true
#
-# -DWITH_BDB=[true|false] [MAY BE BUGGY. DO NOT USE FOR PRODUCTION]
-# Build with the optional Berkeley DB storage.
-# Requires the Berkeley DB development toolkit pre-installed.
-# Default=false
-#
# -DICAL_ERRORS_ARE_FATAL=[true|false]
# Set to make icalerror_* calls abort instead of internally signaling an error
# Default=false
@@ -89,6 +84,10 @@ endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
+#Include CMake capabilities
+include(FeatureSummary)
+
+# Enable the test harness
enable_testing()
if(WINCE)
@@ -109,14 +108,11 @@ set(PROJECT_VERSION "${LIBICAL_LIB_MAJOR_VERSION}.${LIBICAL_LIB_MINOR_VERSION}")
set(PROJECT_URL "http://libical.github.io/libical/")
# compile in Berkeley DB support
-option(WITH_BDB "Build in Berkeley DB Support. Requires pre-installed Berkeley DB development toolkit")
-if(WITH_BDB)
- find_package(BDB)
- if(BDB_FOUND)
- add_definitions(-DWITH_BDB)
- else()
- message(FATAL_ERROR "Cannot build the Berkeley DB storage support as requested. Unable to the locate the pre-installed Berkeley DB development toolkit.")
- endif()
+find_package(BDB)
+set_package_properties(BDB PROPERTIES TYPE OPTIONAL PURPOSE "For Berkeley DB storage support")
+add_feature_info("Berkeley DB storage support" BDB_FOUND "requires the Berkeley DB development toolkit")
+if(BDB_FOUND)
+ set(HAVE_BDB True)
endif()
# library build types
@@ -135,6 +131,7 @@ endif()
# must have Perl to create the derived stuff
find_package(Perl REQUIRED)
+set_package_properties(Perl PROPERTIES TYPE REQUIRED PURPOSE "Required by the libical build system.")
# Ensure finding 64bit libs when using 64-bit compilers
if(CMAKE_CL_64)
@@ -145,6 +142,8 @@ endif()
# libicu can be found at http://www.icu-project.org
# RSCALE info at http://tools.ietf.org/html/rfc7529
find_package(ICU)
+set_package_properties(ICU PROPERTIES TYPE RECOMMENDED PURPOSE "For RSCALE (RFC7529) support")
+add_feature_info("RSCALE support (RFC7529)" ICU_FOUND "requires the ICU development libraries (libicu)")
if(ICU_FOUND)
set(REQUIRES_PRIVATE_ICU "Requires.private: icu-i18n") #for libical.pc
set(HAVE_LIBICU 1)
@@ -464,3 +463,5 @@ install(
DESTINATION ${LIB_INSTALL_DIR}/cmake/LibIcal
FILE LibIcalTargets.cmake
)
+
+feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)