Skip to content

Commit

Permalink
CMakeLists.txt: Allow configuration of DATAROOTDIR
Browse files Browse the repository at this point in the history
  • Loading branch information
heirecka committed Mar 12, 2015
1 parent 320a30f commit 7cfec5a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -438,17 +438,19 @@ else()
set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
set(INCLUDE_INSTALL_DIR "include/gammaray")
set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/GammaRay)
set(XDG_APPS_INSTALL_DIR share/applications)
set(APPDATA_INSTALL_DIR share/appdata)
set(MAN_INSTALL_DIR "share/man/man1")
set(DATAROOTDIR share CACHE PATH "Define install directory for read-only architecture-independent data")
set(XDG_APPS_INSTALL_DIR "${DATAROOTDIR}/applications")
set(APPDATA_INSTALL_DIR "${DATAROOTDIR}/appdata")
set(ICON_INSTALL_DIR "${DATAROOTDIR}/icons")
set(MAN_INSTALL_DIR "${DATAROOTDIR}/man/man1")
if(WIN32)
set(PLUGIN_INSTALL_DIR "plugins")
set(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}")
set(DOC_INSTALL_DIR .)
else()
set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray")
set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray/libexec")
set(DOC_INSTALL_DIR share/doc/gammaray/)
set(DOC_INSTALL_DIR "${DATAROOTDIR}/doc/gammaray/")
endif()
endif()
if(ANDROID)
Expand Down
12 changes: 6 additions & 6 deletions resources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
if(UNIX AND NOT APPLE AND GAMMARAY_BUILD_UI)
install(
FILES GammaRay-16x16.png
DESTINATION share/icons/hicolor/16x16/apps RENAME GammaRay.png
DESTINATION "${ICON_INSTALL_DIR}/hicolor/16x16/apps" RENAME GammaRay.png
)
install(
FILES GammaRay-32x32.png
DESTINATION share/icons/hicolor/32x32/apps RENAME GammaRay.png
DESTINATION "${ICON_INSTALL_DIR}/hicolor/32x32/apps" RENAME GammaRay.png
)
install(
FILES GammaRay-48x48.png
DESTINATION share/icons/hicolor/48x48/apps RENAME GammaRay.png
DESTINATION "${ICON_INSTALL_DIR}/hicolor/48x48/apps" RENAME GammaRay.png
)
install(
FILES GammaRay-128x128.png
DESTINATION share/icons/hicolor/128x128/apps RENAME GammaRay.png
DESTINATION "${ICON_INSTALL_DIR}/hicolor/128x128/apps" RENAME GammaRay.png
)
install(
FILES GammaRay-256x256.png
DESTINATION share/icons/hicolor/256x256/apps RENAME GammaRay.png
DESTINATION "${ICON_INSTALL_DIR}/hicolor/256x256/apps" RENAME GammaRay.png
)
install(
FILES GammaRay-512x512.png
DESTINATION share/icons/hicolor/512x512/apps RENAME GammaRay.png
DESTINATION "${ICON_INSTALL_DIR}/hicolor/512x512/apps" RENAME GammaRay.png
)
endif()

Expand Down

1 comment on commit 7cfec5a

@winterz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine. I'll merge it.

Please sign in to comment.