[evolution-ews] Rename SHARE_INSTALL_DIR to SHARE_INSTALL_PREFIX



commit e2d49d55843b2507bd059f1ca93628b3853717f6
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 13 10:00:30 2016 +0200

    Rename SHARE_INSTALL_DIR to SHARE_INSTALL_PREFIX
    
    That seems to be the correct (common) variable name. Also ensure
    the folders will not be empty.

 CMakeLists.txt                   |   28 +++++++++++++++++++++-------
 cmake/modules/FindIntltool.cmake |    4 ++--
 cmake/modules/GLibTools.cmake    |    2 +-
 3 files changed, 24 insertions(+), 10 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c83657..ed42188 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,13 +63,27 @@ include(PrintableOptions)
 
 add_printable_variable(LIB_SUFFIX "Library directory suffix, usually defined to '64' for x86_64 systems" "")
 add_printable_variable_bare(CMAKE_INSTALL_PREFIX)
-add_printable_variable_path(BIN_INSTALL_DIR "Install directory for binary files, defaults to 
CMAKE_INSTALL_PREFIX/bin" "${CMAKE_INSTALL_PREFIX}/bin")
-add_printable_variable_path(INCLUDE_INSTALL_DIR "Install directory for header files, defaults to 
CMAKE_INSTALL_PREFIX/include" "${CMAKE_INSTALL_PREFIX}/include")
-add_printable_variable_path(LIB_INSTALL_DIR "Install directory for library files, defaults to 
CMAKE_INSTALL_PREFIX/lib{LIB_SUFFIX}" "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-add_printable_variable_path(LIBEXEC_INSTALL_DIR "Install directory for library executable files, defaults to 
CMAKE_INSTALL_PREFIX/libexec" "${CMAKE_INSTALL_PREFIX}/libexec")
-add_printable_variable_path(SHARE_INSTALL_DIR "Install directory for shared files, defaults to 
CMAKE_INSTALL_PREFIX/share" "${CMAKE_INSTALL_PREFIX}/share")
-add_printable_variable_path(LOCALE_INSTALL_DIR "Install directory for locale files, defaults to 
SHARE_INSTALL_DIR/locale" "${SHARE_INSTALL_DIR}/locale")
-add_printable_variable_path(SYSCONF_INSTALL_DIR "Install directory for system configuration files, defaults 
to CMAKE_INSTALL_PREFIX/etc" "${CMAKE_INSTALL_PREFIX}/etc")
+add_printable_variable_path(BIN_INSTALL_DIR "Install directory for binary files, defaults to 
CMAKE_INSTALL_PREFIX/bin" "")
+add_printable_variable_path(INCLUDE_INSTALL_DIR "Install directory for header files, defaults to 
CMAKE_INSTALL_PREFIX/include" "")
+add_printable_variable_path(LIB_INSTALL_DIR "Install directory for library files, defaults to 
CMAKE_INSTALL_PREFIX/lib{LIB_SUFFIX}" "")
+add_printable_variable_path(LIBEXEC_INSTALL_DIR "Install directory for library executable files, defaults to 
CMAKE_INSTALL_PREFIX/libexec" "")
+add_printable_variable_path(SHARE_INSTALL_PREFIX "Install directory for shared files, defaults to 
CMAKE_INSTALL_PREFIX/share" "")
+add_printable_variable_path(LOCALE_INSTALL_DIR "Install directory for locale files, defaults to 
SHARE_INSTALL_PREFIX/locale" "")
+add_printable_variable_path(SYSCONF_INSTALL_DIR "Install directory for system configuration files, defaults 
to CMAKE_INSTALL_PREFIX/etc" "")
+
+macro(ensure_default_value _var _defvalue)
+       if(${_var} STREQUAL "")
+               set(${_var} ${_defvalue})
+       endif(${_var} STREQUAL "")
+endmacro(ensure_default_value)
+
+ensure_default_value(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+ensure_default_value(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
+ensure_default_value(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+ensure_default_value(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/libexec")
+ensure_default_value(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share")
+ensure_default_value(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale")
+ensure_default_value(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc")
 
 # ******************************
 # Dependencies
diff --git a/cmake/modules/FindIntltool.cmake b/cmake/modules/FindIntltool.cmake
index f6f27fe..a2c3547 100644
--- a/cmake/modules/FindIntltool.cmake
+++ b/cmake/modules/FindIntltool.cmake
@@ -39,7 +39,7 @@
 #
 # add_appdata_file(_infilename _outfilename)
 #    A shortcut to call intltool-merge() for an appdata file and install it
-#    to ${SHARE_INSTALL_DIR}/appdata
+#    to ${SHARE_INSTALL_PREFIX}/appdata
 
 include(FindGettext)
 
@@ -204,6 +204,6 @@ macro(add_appdata_file _infilename _outfilename)
        add_dependencies(appdata-files appdata-${_outtarget})
 
        install(FILES ${_out}
-               DESTINATION ${SHARE_INSTALL_DIR}/appdata
+               DESTINATION ${SHARE_INSTALL_PREFIX}/appdata
        )
 endmacro(add_appdata_file)
diff --git a/cmake/modules/GLibTools.cmake b/cmake/modules/GLibTools.cmake
index ba05824..d6728be 100644
--- a/cmake/modules/GLibTools.cmake
+++ b/cmake/modules/GLibTools.cmake
@@ -193,7 +193,7 @@ if(NOT GLIB_COMPILE_SCHEMAS)
        message(FATAL_ERROR "Cannot find glib-compile-schemas, which is required to build ${PROJECT_NAME}")
 endif(NOT GLIB_COMPILE_SCHEMAS)
 
-set(GSETTINGS_SCHEMAS_DIR "${SHARE_INSTALL_DIR}/glib-2.0/schemas/")
+set(GSETTINGS_SCHEMAS_DIR "${SHARE_INSTALL_PREFIX}/glib-2.0/schemas/")
 
 macro(add_gsettings_schemas _target _schema0)
        set(_install_code)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]