[evolution] Rename SHARE_INSTALL_DIR to SHARE_INSTALL_PREFIX



commit 37a26b621dfb8ad53df6ba2ee54b057b520f586f
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 13 09:56:58 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                            |   30 +++++++++++++++++++++-------
 cmake/modules/FindIntltool.cmake          |    4 +-
 cmake/modules/GLibTools.cmake             |    2 +-
 cmake/modules/GtkDoc.cmake                |    2 +-
 cmake/modules/IconCache.cmake             |    6 ++--
 cmake/modules/InstalledTests.cmake        |    2 +-
 data/CMakeLists.txt                       |    4 +-
 data/icons/CMakeLists.txt                 |    2 +-
 evolution-shell.pc.in                     |    4 +-
 help/CMakeLists.txt                       |   10 ++++----
 src/e-util/CMakeLists.txt                 |    2 +-
 src/libemail-engine/libemail-engine.pc.in |    4 +-
 src/modules/backup-restore/CMakeLists.txt |    2 +-
 13 files changed, 44 insertions(+), 30 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77853af..6b9357c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,13 +113,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")
 
 # ******************************
 # Special directories
@@ -128,7 +142,7 @@ add_printable_variable_path(SYSCONF_INSTALL_DIR "Install directory for system co
 # If you add something here, consider whether or not you also
 # need to add it to one or more .pc.in files (for Connector, etc)
 
-set(privdatadir "${SHARE_INSTALL_DIR}/${PROJECT_NAME}")
+set(privdatadir "${SHARE_INSTALL_PREFIX}/${PROJECT_NAME}")
 set(privincludedir "${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}")
 set(privlibdir "${LIB_INSTALL_DIR}/${PROJECT_NAME}")
 set(privlibexecdir "${LIBEXEC_INSTALL_DIR}/${PROJECT_NAME}")
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)
diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake
index 4aa286a..5640838 100644
--- a/cmake/modules/GtkDoc.cmake
+++ b/cmake/modules/GtkDoc.cmake
@@ -48,7 +48,7 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
                @ONLY
        )
 
-       set(OUTPUT_DOCDIR ${SHARE_INSTALL_DIR}/gtk-doc/html/${_module})
+       set(OUTPUT_DOCDIR ${SHARE_INSTALL_PREFIX}/gtk-doc/html/${_module})
 
        set(_ignore_headers)
        foreach(_header ${${_ignoreheadersvar}})
diff --git a/cmake/modules/IconCache.cmake b/cmake/modules/IconCache.cmake
index 065a44b..6f7f5f0 100644
--- a/cmake/modules/IconCache.cmake
+++ b/cmake/modules/IconCache.cmake
@@ -33,10 +33,10 @@ endmacro(split_icon_components)
 
 find_program(GTK_UPDATE_ICON_CACHE gtk-update-icon-cache)
 if(NOT GTK_UPDATE_ICON_CACHE)
-       message(WARNING "gtk-update-icon-cache not found. Make sure to call ${GTK_UPDATE_ICON_CACHE} -f -t 
\"${SHARE_INSTALL_DIR}/icons/hicolor\" after install and uninstall")
+       message(WARNING "gtk-update-icon-cache not found. Make sure to call ${GTK_UPDATE_ICON_CACHE} -f -t 
\"${SHARE_INSTALL_PREFIX}/icons/hicolor\" after install and uninstall")
 endif(NOT GTK_UPDATE_ICON_CACHE)
 
-set(_update_icon_cache_cmd ${GTK_UPDATE_ICON_CACHE} -f -t "${SHARE_INSTALL_DIR}/icons/hicolor")
+set(_update_icon_cache_cmd ${GTK_UPDATE_ICON_CACHE} -f -t "${SHARE_INSTALL_PREFIX}/icons/hicolor")
 
 macro(process_icons _destdir _fileslistvar _install_codevar)
        foreach(srcfile IN LISTS ${_fileslistvar})
@@ -69,6 +69,6 @@ endmacro(add_icon_cache_files)
 if(GTK_UPDATE_ICON_CACHE)
        add_custom_command(TARGET uninstall POST_BUILD
                COMMAND ${CMAKE_COMMAND} -E chdir . ${_update_icon_cache_cmd}
-               COMMENT "Updating icon cache in '${SHARE_INSTALL_DIR}/icons/hicolor'"
+               COMMENT "Updating icon cache in '${SHARE_INSTALL_PREFIX}/icons/hicolor'"
        )
 endif(GTK_UPDATE_ICON_CACHE)
diff --git a/cmake/modules/InstalledTests.cmake b/cmake/modules/InstalledTests.cmake
index ec44553..82380fa 100644
--- a/cmake/modules/InstalledTests.cmake
+++ b/cmake/modules/InstalledTests.cmake
@@ -20,7 +20,7 @@ include(PrintableOptions)
 add_printable_option(ENABLE_INSTALLED_TESTS "Enable installed tests" OFF)
 
 set(INSTALLED_TESTS_EXEC_DIR ${privlibexecdir}/installed-tests)
-set(INSTALLED_TESTS_META_DIR ${SHARE_INSTALL_DIR}/installed-tests/${PROJECT_NAME})
+set(INSTALLED_TESTS_META_DIR ${SHARE_INSTALL_PREFIX}/installed-tests/${PROJECT_NAME})
 
 macro(install_test_if_enabled _test_target _type _environ)
        if(ENABLE_INSTALLED_TESTS)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index e6fb9cd..7a49596 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,6 +1,6 @@
 set(filedeps)
 set(autostartdir ${SYSCONF_INSTALL_DIR}/xdg/autostart)
-set(desktopdir ${SHARE_INSTALL_DIR}/applications)
+set(desktopdir ${SHARE_INSTALL_PREFIX}/applications)
 set(themedir ${privdatadir}/theme)
 
 configure_file(evolution.desktop.in.in
@@ -73,7 +73,7 @@ add_custom_target(data-files ALL
 add_gsettings_schemas(data-files ${BUILT_SCHEMAS})
 
 install(FILES evolution.convert
-       DESTINATION ${SHARE_INSTALL_DIR}/GConf/gsettings
+       DESTINATION ${SHARE_INSTALL_PREFIX}/GConf/gsettings
 )
 
 add_subdirectory(icons)
diff --git a/data/icons/CMakeLists.txt b/data/icons/CMakeLists.txt
index 6d8585f..769dc6d 100644
--- a/data/icons/CMakeLists.txt
+++ b/data/icons/CMakeLists.txt
@@ -230,5 +230,5 @@ set(noinst_icons
        hicolor_status_32x32_online.svg
 )
 
-add_icon_cache_files("${SHARE_INSTALL_DIR}" public_icons)
+add_icon_cache_files("${SHARE_INSTALL_PREFIX}" public_icons)
 add_icon_cache_files("${privdatadir}" private_icons stock_private_icons)
diff --git a/evolution-shell.pc.in b/evolution-shell.pc.in
index 0bb224f..30a7f40 100644
--- a/evolution-shell.pc.in
+++ b/evolution-shell.pc.in
@@ -2,8 +2,8 @@ prefix=@CMAKE_INSTALL_PREFIX@
 libdir=@LIB_INSTALL_DIR@
 libexecdir=@LIBEXEC_INSTALL_DIR@
 includedir=@INCLUDE_INSTALL_DIR@
-datarootdir=@SHARE_INSTALL_DIR@
-datadir=@SHARE_INSTALL_DIR@
+datarootdir=@SHARE_INSTALL_PREFIX@
+datadir=@SHARE_INSTALL_PREFIX@
 
 privlibdir=@privsolibdir@
 privlibexecdir=@privlibexecdir@
diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt
index 1b61360..e1cc16a 100644
--- a/help/CMakeLists.txt
+++ b/help/CMakeLists.txt
@@ -284,7 +284,7 @@ macro(create_help_files_for_lang _lang _helpfilesvar)
        add_dependencies(help-files ${_lang}-help-files)
 
        install(FILES ${installed}
-               DESTINATION ${SHARE_INSTALL_DIR}/help/${_lang}/${HELP_ID}/
+               DESTINATION ${SHARE_INSTALL_PREFIX}/help/${_lang}/${HELP_ID}/
        )
 endmacro(create_help_files_for_lang)
 
@@ -297,12 +297,12 @@ foreach(dir ${directories})
                foreach(_media ${HELP_MEDIA})
                        if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
                                install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}
-                                       DESTINATION 
${SHARE_INSTALL_DIR}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
+                                       DESTINATION 
${SHARE_INSTALL_PREFIX}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
                                )
                        else(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
                                # Pity, no symlink ability here
                                install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/C/${_media}
-                                       DESTINATION 
${SHARE_INSTALL_DIR}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
+                                       DESTINATION 
${SHARE_INSTALL_PREFIX}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
                                )
                        endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
                endforeach(_media)
@@ -315,7 +315,7 @@ foreach(_file ${HELP_FILES})
 endforeach(_file)
 
 install(FILES ${cinstalled}
-       DESTINATION ${SHARE_INSTALL_DIR}/help/C/${HELP_ID}/
+       DESTINATION ${SHARE_INSTALL_PREFIX}/help/C/${HELP_ID}/
 )
 
 set(cinstalled)
@@ -324,7 +324,7 @@ foreach(_file ${HELP_MEDIA})
 endforeach(_file)
 
 install(FILES ${cinstalled}
-       DESTINATION ${SHARE_INSTALL_DIR}/help/C/${HELP_ID}/${HELP_FIGURES_DIR}
+       DESTINATION ${SHARE_INSTALL_PREFIX}/help/C/${HELP_ID}/${HELP_FIGURES_DIR}
 )
 
 add_subdirectory(quickref)
diff --git a/src/e-util/CMakeLists.txt b/src/e-util/CMakeLists.txt
index cfb670b..ab25ae6 100644
--- a/src/e-util/CMakeLists.txt
+++ b/src/e-util/CMakeLists.txt
@@ -577,7 +577,7 @@ add_dependencies(evolution-util
 target_compile_definitions(evolution-util PRIVATE
        -DG_LOG_DOMAIN=\"evolution-util\"
        -DEVOLUTION_BINDIR=\"${BIN_INSTALL_DIR}\"
-       -DEVOLUTION_DATADIR=\"${SHARE_INSTALL_DIR}\"
+       -DEVOLUTION_DATADIR=\"${SHARE_INSTALL_PREFIX}\"
        -DEVOLUTION_ECPSDIR=\"${privdatadir}/ecps\"
        -DEVOLUTION_ETSPECDIR=\"${etspecdir}\"
        -DEVOLUTION_GALVIEWSDIR=\"${viewsdir}\"
diff --git a/src/libemail-engine/libemail-engine.pc.in b/src/libemail-engine/libemail-engine.pc.in
index d607b1b..bbc290f 100644
--- a/src/libemail-engine/libemail-engine.pc.in
+++ b/src/libemail-engine/libemail-engine.pc.in
@@ -1,8 +1,8 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 libdir=@LIB_INSTALL_DIR@
 includedir=@INCLUDE_INSTALL_DIR@
-datarootdir=@SHARE_INSTALL_DIR@
-datadir=@SHARE_INSTALL_DIR@
+datarootdir=@SHARE_INSTALL_PREFIX@
+datadir=@SHARE_INSTALL_PREFIX@
 
 privlibdir=@privsolibdir@
 privincludedir=@privincludedir@
diff --git a/src/modules/backup-restore/CMakeLists.txt b/src/modules/backup-restore/CMakeLists.txt
index f60f31c..80a6fa6 100644
--- a/src/modules/backup-restore/CMakeLists.txt
+++ b/src/modules/backup-restore/CMakeLists.txt
@@ -52,7 +52,7 @@ add_dependencies(evolution-backup
 target_compile_definitions(evolution-backup PRIVATE
        -DG_LOG_DOMAIN=\"evolution-backup\"
        -DEVOLUTION_LOCALEDIR=\"${LOCALE_INSTALL_DIR}\"
-       -DDBUS_SERVICES_DIR=\"${SHARE_INSTALL_DIR}/dbus-1/services\"
+       -DDBUS_SERVICES_DIR=\"${SHARE_INSTALL_PREFIX}/dbus-1/services\"
 )
 
 target_compile_options(evolution-backup PUBLIC


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