[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 11/473: Switch to using GNU install variables.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:53:01 CET 2015


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 0ba56a1980b87a20990017663ffdba847865c0b6
Author: Graeme Gott <graeme at gottcode.org>
Date:   Sat Jun 22 15:19:34 2013 -0400

    Switch to using GNU install variables.
---
 CMakeLists.txt             |   38 ++------------------------------------
 INSTALL                    |   14 +++++---------
 icons/CMakeLists.txt       |   20 +++++++++++---------
 po/en_GB/CMakeLists.txt    |    2 +-
 po/he/CMakeLists.txt       |    2 +-
 po/tr/CMakeLists.txt       |    2 +-
 src/CMakeLists.txt         |    6 +++---
 xfce4-popup-whiskermenu.in |    2 +-
 8 files changed, 25 insertions(+), 61 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62ad66c..d4d6a98 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,41 +3,7 @@ cmake_policy(VERSION 2.8)
 
 project(whiskermenu)
 
-if(NOT DEFINED BIN_INSTALL_DIR)
-    if (DEFINED CMAKE_INSTALL_BINDIR)
-        set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
-    else()
-        set(BIN_INSTALL_DIR bin)
-    endif()
-endif()
-
-if(NOT DEFINED LIB_INSTALL_DIR)
-    if (DEFINED CMAKE_INSTALL_LIBDIR)
-        set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
-    else()
-        set(LIB_INSTALL_DIR lib)
-    endif()
-endif()
-
-if(NOT DEFINED DATA_INSTALL_DIR)
-    if (DEFINED CMAKE_DATA_PATH)
-        set(DATA_INSTALL_DIR ${CMAKE_DATA_PATH})
-    else()
-        set(DATA_INSTALL_DIR share)
-    endif()
-endif()
-
-if(NOT DEFINED ICON_INSTALL_DIR)
-    set(ICON_INSTALL_DIR ${DATA_INSTALL_DIR}/icons)
-endif()
-
-if(NOT DEFINED LOCALE_INSTALL_DIR)
-    if (DEFINED CMAKE_LOCALE_PATH)
-        set(LOCALE_INSTALL_DIR ${CMAKE_LOCALE_PATH})
-    else()
-        set(LOCALE_INSTALL_DIR ${DATA_INSTALL_DIR}/locale)
-    endif()
-endif()
+include(GNUInstallDirs)
 
 add_subdirectory(src)
 add_subdirectory(po)
@@ -45,4 +11,4 @@ add_subdirectory(icons)
 
 configure_file(${PROJECT_SOURCE_DIR}/xfce4-popup-whiskermenu.in
     ${PROJECT_BINARY_DIR}/xfce4-popup-whiskermenu ESCAPE_QUOTES @ONLY)
-install(PROGRAMS ${PROJECT_BINARY_DIR}/xfce4-popup-whiskermenu DESTINATION ${BIN_INSTALL_DIR})
+install(PROGRAMS ${PROJECT_BINARY_DIR}/xfce4-popup-whiskermenu DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/INSTALL b/INSTALL
index e4454af..aa56866 100644
--- a/INSTALL
+++ b/INSTALL
@@ -45,22 +45,18 @@ More CMake Options
     Choose the base location where the plugin is installed
     (defaults to /usr/local).
 
--DBIN_INSTALL_DIR=<path>
+-DCMAKE_INSTALL_BINDIR=<path>
     Choose where binaries are installed
     (defaults to $CMAKE_INSTALL_PREFIX/bin).
 
--DLIB_INSTALL_DIR=<path>
+-DCMAKE_INSTALL_LIBDIR=<path>
     Choose where libraries are installed
     (defaults to $CMAKE_INSTALL_PREFIX/lib).
 
--DDATA_INSTALL_DIR=<path>
+-DCMAKE_INSTALL_DATADIR=<path>
     Choose where the data files are installed
     (defaults to $CMAKE_INSTALL_PREFIX/share).
 
--DICON_INSTALL_DIR=<path>
-    Choose where the icons are installed
-    (defaults to $DATA_INSTALL_DIR/icons).
-
--DLOCALE_INSTALL_DIR=<path>
+-DCMAKE_INSTALL_LOCALEDIR=<path>
     Choose where the localization files are installed
-    (defaults to $DATA_INSTALL_DIR/locale).
+    (defaults to $CMAKE_INSTALL_DATADIR/locale).
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index 4659c16..899e3ac 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -1,35 +1,37 @@
+set(INSTALL_ICONDIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor)
+
 install(FILES hi16-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/16x16/apps
+        DESTINATION ${INSTALL_ICONDIR}/16x16/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hi22-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/22x22/apps
+        DESTINATION ${INSTALL_ICONDIR}/22x22/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hi24-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/24x24/apps
+        DESTINATION ${INSTALL_ICONDIR}/24x24/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hi32-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/32x32/apps
+        DESTINATION ${INSTALL_ICONDIR}/32x32/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hi48-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps
+        DESTINATION ${INSTALL_ICONDIR}/48x48/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hi64-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/64x64/apps
+        DESTINATION ${INSTALL_ICONDIR}/64x64/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hi128-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/128x128/apps
+        DESTINATION ${INSTALL_ICONDIR}/128x128/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hi256-app-whiskermenu.png
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/256x256/apps
+        DESTINATION ${INSTALL_ICONDIR}/256x256/apps
         RENAME xfce4-whiskermenu.png)
 
 install(FILES hisc-app-whiskermenu.svg
-        DESTINATION ${ICON_INSTALL_DIR}/hicolor/scalable/apps
+        DESTINATION ${INSTALL_ICONDIR}/scalable/apps
         RENAME xfce4-whiskermenu.svg)
diff --git a/po/en_GB/CMakeLists.txt b/po/en_GB/CMakeLists.txt
index 18afcbc..701b27e 100644
--- a/po/en_GB/CMakeLists.txt
+++ b/po/en_GB/CMakeLists.txt
@@ -1 +1 @@
-GETTEXT_PROCESS_PO_FILES(en_GB ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES xfce4-whiskermenu-plugin.po)
+GETTEXT_PROCESS_PO_FILES(en_GB ALL INSTALL_DESTINATION ${CMAKE_INSTALL_LOCALEDIR} PO_FILES xfce4-whiskermenu-plugin.po)
diff --git a/po/he/CMakeLists.txt b/po/he/CMakeLists.txt
index 4e4cdbc..7f818af 100644
--- a/po/he/CMakeLists.txt
+++ b/po/he/CMakeLists.txt
@@ -1 +1 @@
-GETTEXT_PROCESS_PO_FILES(he ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES xfce4-whiskermenu-plugin.po)
+GETTEXT_PROCESS_PO_FILES(he ALL INSTALL_DESTINATION ${CMAKE_INSTALL_LOCALEDIR} PO_FILES xfce4-whiskermenu-plugin.po)
diff --git a/po/tr/CMakeLists.txt b/po/tr/CMakeLists.txt
index 5ca81c3..ac678aa 100644
--- a/po/tr/CMakeLists.txt
+++ b/po/tr/CMakeLists.txt
@@ -1 +1 @@
-GETTEXT_PROCESS_PO_FILES(tr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES xfce4-whiskermenu-plugin.po)
+GETTEXT_PROCESS_PO_FILES(tr ALL INSTALL_DESTINATION ${CMAKE_INSTALL_LOCALEDIR} PO_FILES xfce4-whiskermenu-plugin.po)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3cbad02..6aa3c12 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,7 +36,7 @@ link_directories(
 
 add_definitions(
     -DGETTEXT_PACKAGE="whiskermenu"
-    -DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/${LOCALE_INSTALL_DIR}"
+    -DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}"
     -DGSEAL_ENABLE=1
     -DGDK_DISABLE_SINGLE_INCLUDES=1
     -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES=1
@@ -82,5 +82,5 @@ target_link_libraries(whiskermenu
     ${libxfce4util_LIBRARIES}
     ${GTK2_LIBRARIES})
 
-install(TARGETS whiskermenu LIBRARY DESTINATION ${LIB_INSTALL_DIR}/xfce4/panel/plugins)
-install(FILES ../whiskermenu.desktop DESTINATION ${DATA_INSTALL_DIR}/xfce4/panel/plugins)
+install(TARGETS whiskermenu LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/xfce4/panel/plugins)
+install(FILES ../whiskermenu.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/xfce4/panel/plugins)
diff --git a/xfce4-popup-whiskermenu.in b/xfce4-popup-whiskermenu.in
index 411cdaa..41c60a8 100644
--- a/xfce4-popup-whiskermenu.in
+++ b/xfce4-popup-whiskermenu.in
@@ -1,3 +1,3 @@
 #!/bin/sh
 
- at CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/xfce4-panel --plugin-event=whiskermenu:popup
+ at CMAKE_INSTALL_FULL_BINDIR@/xfce4-panel --plugin-event=whiskermenu:popup

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list