diff options
| author | Milan Crha <mcrha@redhat.com> | 2016-12-01 11:06:11 +0100 |
|---|---|---|
| committer | Milan Crha <mcrha@redhat.com> | 2016-12-01 11:06:11 +0100 |
| commit | e29f75ea28350f8034144cb600db8fd0da01315d (patch) | |
| tree | 6e680bc01d64b0976df39f684794d4b5bf10b4d8 /CMakeLists.txt | |
| parent | e243f78fec0e439f07034ebcf5f396d4a8b230db (diff) | |
| download | evolution-data-server-e29f75ea28350f8034144cb600db8fd0da01315d.tar.gz | |
Bug 775363 - Fails to build with minimum CMake version
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f3349c5e..11496548a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Evolution-Data-Server build script -cmake_minimum_required(VERSION 3.0) -cmake_policy(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) +cmake_policy(VERSION 3.1) project(evolution-data-server VERSION 3.23.3 @@ -217,7 +217,12 @@ add_printable_variable_path(WITH_DBUS_SERVICE_DIR "Set directory for D-Bus servi add_printable_variable_path(WITH_SYSTEMDUSERUNITDIR "Set directory for systemd user units, or 'no' to disable" "${CMAKE_INSTALL_PREFIX}/lib/systemd/user") string(LENGTH "${CMAKE_BINARY_DIR}" bindirlen) -string(SUBSTRING "${WITH_SYSTEMDUSERUNITDIR}" 0 ${bindirlen} substr) +string(LENGTH "${WITH_SYSTEMDUSERUNITDIR}" maxlen) +if(maxlen LESS bindirlen) + set(substr "***") +else(maxlen LESS bindirlen) + string(SUBSTRING "${WITH_SYSTEMDUSERUNITDIR}" 0 ${bindirlen} substr) +endif(maxlen LESS bindirlen) string(TOUPPER "${WITH_SYSTEMDUSERUNITDIR}" optupper) if(("${optupper}" STREQUAL "ON") OR ("${substr}" STREQUAL "${CMAKE_BINARY_DIR}")) @@ -230,6 +235,7 @@ else() endif() unset(bindirlen) +unset(maxlen) unset(substr) unset(optupper) |
