use GNUInstallDirs module

This commit is contained in:
Martin Marmsoler 2022-06-10 14:28:28 +02:00 committed by kas
parent 03684ab171
commit 7a91b325a1
4 changed files with 6 additions and 4 deletions

View File

@ -84,6 +84,8 @@ if(DEBUG_FLATPAK)
add_compile_definitions(DEBUG_FLATPAK)
endif()
include(GNUInstallDirs) # Defines some variables as BINDIR, LIBDIR, ...
set(QT_TRANSLATIONS_DIR "${Qt5_DIR}/../../../translations")
set(QT_TRANSLATIONS_DIR "/usr/share/qt/translations")

View File

@ -194,7 +194,7 @@ endif()
if(UNIX AND NOT APPLE)
install(
DIRECTORY ${RSRC_DIR}/Gittyup.iconset
DESTINATION ./${DATA_INSTALL_PREFIX}/Resources
DESTINATION ${DATADIR}/Gittyup/Resources
COMPONENT ${GITTYUP_NAME})
endif()

View File

@ -206,7 +206,7 @@ execute_process(COMMAND
COMPONENT ${GITTYUP_NAME})
else()
# must be ./ otherwise it is interpreted as absolute path
set(RESOURCES_INSTALL_DIR "./${DATA_INSTALL_PREFIX}/Resources")
set(RESOURCES_INSTALL_DIR "${DATADIR}/Gittyup/Resources")
# Install config files.
if(CHANGELOG_HTML
AND ACKNOWLEDGMENTS_HTML

View File

@ -6,7 +6,7 @@ target_link_libraries(conf lua Qt5::Core util)
target_compile_definitions(
conf PRIVATE SCINTILLUA_LEXERS_DIR="${SCINTILLUA_LEXERS_DIR}")
target_compile_definitions(conf PRIVATE CONF_DIR="${DATA_INSTALL_PREFIX}/Resources"
L10N_DIR="${DATA_INSTALL_PREFIX}/Resources/l10n")
target_compile_definitions(conf PRIVATE CONF_DIR="${DATADIR}/Resources"
L10N_DIR="${DATADIR}/Resources/l10n")
set_target_properties(conf PROPERTIES AUTOMOC ON)