Skip to content

Commit

Permalink
Use GNUInstallDirs to install arch-independent data (hluk#1037)
Browse files Browse the repository at this point in the history
This allows better control on installation directories which helps on
distributions with multiarch layout. Executables and libraries go into
/usr/arch/{bin,lib} and architecture independent files will be installed in /usr/share.
  • Loading branch information
kapsh authored and hluk committed Nov 7, 2018
1 parent 4c95e5e commit 399a36a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ OPTION(PEDANTIC "Enable all compiler warnings" OFF)
# Options (cmake -LH)
OPTION(WITH_TESTS "Run test cases from command line" ${COPYQ_DEBUG})
OPTION(WITH_PLUGINS "Compile plugins" ON)

# Unix-specific options
if (UNIX AND NOT APPLE)
include(GNUInstallDirs)
set(PLUGIN_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${CMAKE_SHARED_MODULE_PREFIX}/copyq/plugins" CACHE PATH "Install path for plugins")
set(ICON_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps" CACHE PATH "Install path for icons")
set(ICON_INSTALL_PREFIX_TEMPLATE "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/%SIZE%/apps" CACHE PATH "Install path for icons (%SIZE% is icon size)")
set(THEME_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/copyq/themes" CACHE PATH "Install path for themes")
set(DESKTOP_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/applications" CACHE PATH "Install path for desktop file")
set(APPDATA_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/metainfo" CACHE PATH "Install path for AppData file")
set(MANPAGE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/man/man1" CACHE PATH "Install path for manual pages")
set(TRANSLATION_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/copyq/translations" CACHE PATH "Install path for translations")
set(ICON_INSTALL_PREFIX "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps" CACHE PATH "Install path for icons")
set(ICON_INSTALL_PREFIX_TEMPLATE "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/%SIZE%/apps" CACHE PATH "Install path for icons (%SIZE% is icon size)")
set(THEME_INSTALL_PREFIX "${CMAKE_INSTALL_DATAROOTDIR}/copyq/themes" CACHE PATH "Install path for themes")
set(DESKTOP_INSTALL_PREFIX "${CMAKE_INSTALL_DATAROOTDIR}/applications" CACHE PATH "Install path for desktop file")
set(APPDATA_INSTALL_PREFIX "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" CACHE PATH "Install path for AppData file")
set(MANPAGE_INSTALL_PREFIX "${CMAKE_INSTALL_MANDIR}/man1" CACHE PATH "Install path for manual pages")
set(TRANSLATION_INSTALL_PREFIX "${CMAKE_INSTALL_DATAROOTDIR}/copyq/translations" CACHE PATH "Install path for translations")
set(ICON_NAME "copyq" CACHE STRING "Name for icon files")
endif()

Expand Down

0 comments on commit 399a36a

Please sign in to comment.