summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-11-13 06:22:17 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-11-13 06:44:15 +0100
commit2bb4a347cdfbee92334d5340ba640c8680a81d9e (patch)
tree76f8d377ac569e11a9f259dd33b8b6c75ff6488d /CMakeLists.txt
parent12eeb4d11eee5b8e6514f0ce8bf7508cc2d6d7a1 (diff)
downloadbiboumi-2bb4a347cdfbee92334d5340ba640c8680a81d9e.tar.gz
biboumi-2bb4a347cdfbee92334d5340ba640c8680a81d9e.tar.bz2
biboumi-2bb4a347cdfbee92334d5340ba640c8680a81d9e.tar.xz
biboumi-2bb4a347cdfbee92334d5340ba640c8680a81d9e.zip
Improve dependencies checks in the build process
- Rename all Find*.cmake files to uppercase, to make things more consistent, and fix some issues with them (notably the REQUIRED flag) - Rename SYSTEMDDAEMON to SYSTEMD and only use the libsystemd instead of libsystemd-daemon because it's deprecated for a long time now - Provide a WITH_* and WITHOUT_* switch for all optional dependencies - Document things in the INSTALL file
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 18 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14c002c..138bdeb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,14 +18,25 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
include(FindEXPAT)
find_package(EXPAT REQUIRED)
-find_package(Iconv REQUIRED)
-find_package(Libuuid REQUIRED)
-find_package(Libidn)
-if(NOT WITHOUT_SYSTEMD)
- find_package(SystemdDaemon)
+find_package(ICONV REQUIRED)
+find_package(LIBUUID REQUIRED)
+
+if(WITH_LIBIDN)
+ find_package(LIBIDN REQUIRED)
+elseif(NOT WITHOUT_LIBIDN)
+ find_package(LIBIDN)
+endif()
+
+if(WITH_SYSTEMD)
+ find_package(SYSTEMD REQUIRED)
+elseif(NOT WITHOUT_SYSTEMD)
+ find_package(SYSTEMD)
endif()
-if(NOT WITHOUT_BOTAN)
- find_package(Botan)
+
+if(WITH_BOTAN)
+ find_package(BOTAN REQUIRED)
+elseif(NOT WITHOUT_BOTAN)
+ find_package(BOTAN)
endif()
#