Commit 37a26b62 authored by Milan Crha's avatar Milan Crha

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.
parent 8726851c
......@@ -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}")
......
......@@ -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)
......@@ -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)
......
......@@ -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}})
......
......@@ -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)
......@@ -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)
......
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)
......
......@@ -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)
......@@ -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@
......
......@@ -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)
......@@ -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}\"
......
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@
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment