all repos — tint2 @ b0cfb4e93374a4b39c64e56739a74e2986f97293

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Allow docdir to be defined at build-time

- Simplify by using GNUInstallDirs module
- Move html documentation into an html subdirectory
Chris Mayo aklhfex@gmail.com
commit

b0cfb4e93374a4b39c64e56739a74e2986f97293

parent

6f49df9612139b9cad501351ef1fff7cc7bb9972

4 files changed, 24 insertions(+), 24 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -1,5 +1,5 @@

project( tint2 ) -cmake_minimum_required( VERSION 2.6 ) +cmake_minimum_required( VERSION 2.8.5 ) option( ENABLE_BATTERY "Enable battery status plugin" ON ) option( ENABLE_TINT2CONF "Enable tint2conf build, a GTK+2 theme configurator for tint2" ON )

@@ -12,6 +12,14 @@ option( ENABLE_BACKTRACE_ON_SIGNAL "Dump a backtrace also when receiving signals such as SIGSEGV" OFF )

if( CMAKE_SYSTEM_NAME STREQUAL "Linux" ) option( ENABLE_UEVENT "Kernel event handling support" ON ) endif( CMAKE_SYSTEM_NAME STREQUAL "Linux" ) + +include( GNUInstallDirs ) +if(NOT docdir) + set(docdir ${CMAKE_INSTALL_DOCDIR}) +endif() +if(NOT htmldir) + set(htmldir ${docdir}/html) +endif() include( FindPkgConfig ) include( CheckLibraryExists )

@@ -200,11 +208,6 @@ SET(ASAN_C_FLAGS "")

SET(ASAN_L_FLAGS "") endif() -set( MANDIR share/man CACHE PATH "Directory for man pages" ) -set( DATADIR share CACHE PATH "Directory for shared data" ) -set( SYSCONFDIR /etc CACHE PATH "Directory for configuration files" ) -set( DOCDIR share/doc/tint2 CACHE PATH "Directory for documentation files" ) - add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_version.sh" "\"${PROJECT_SOURCE_DIR}\"" ) link_directories( ${X11_LIBRARY_DIRS}

@@ -243,14 +246,15 @@ set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -Wpointer-arith -fno-strict-aliasing -pthread -std=c99 ${ASAN_C_FLAGS}" )

set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS} ${BACKTRACE_L_FLAGS}" ) install( TARGETS tint2 DESTINATION bin ) -install( FILES tint2.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps ) -install( FILES tint2.desktop DESTINATION ${DATADIR}/applications ) -install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" ) -install( FILES themes/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 ) -install( FILES default_icon.png DESTINATION ${DATADIR}/tint2 ) -install( FILES AUTHORS ChangeLog README.md doc/tint2.md doc/manual.html doc/readme.html DESTINATION ${DOCDIR} ) -install( DIRECTORY doc/images DESTINATION ${DOCDIR} ) -install( FILES doc/tint2.1 DESTINATION ${MANDIR}/man1 ) +install( FILES tint2.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps ) +install( FILES tint2.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications ) +install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" ) +install( FILES themes/tint2rc DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/xdg/tint2 ) +install( FILES default_icon.png DESTINATION ${CMAKE_INSTALL_DATADIR}/tint2 ) +install( FILES AUTHORS ChangeLog README.md doc/tint2.md DESTINATION ${docdir} ) +install( FILES doc/manual.html doc/readme.html DESTINATION ${htmldir} ) +install( DIRECTORY doc/images DESTINATION ${htmldir} ) +install( FILES doc/tint2.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) if( ENABLE_EXTRA_THEMES ) add_subdirectory(themes) endif( ENABLE_EXTRA_THEMES )
M src/tint2conf/CMakeLists.txtsrc/tint2conf/CMakeLists.txt

@@ -57,12 +57,8 @@ ${GTHREAD2_LIBRARIES}

${GTK2_LIBRARIES} ${RSVG_LIBRARIES} ) -if ( NOT DATADIR ) - set(DATADIR share) -endif( NOT DATADIR ) - add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" ) -add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/${DATADIR}/locale\" ) +add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\" ) add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" ) set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c99" ) set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )

@@ -70,6 +66,6 @@

add_subdirectory(po) install( TARGETS tint2conf DESTINATION bin ) -install( FILES tint2conf.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps ) -install( FILES tint2conf.desktop DESTINATION ${DATADIR}/applications ) -install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" ) +install( FILES tint2conf.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps ) +install( FILES tint2conf.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications ) +install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" )
M src/tint2conf/po/CMakeLists.txtsrc/tint2conf/po/CMakeLists.txt

@@ -11,7 +11,7 @@ else()

foreach(LANG ${LANGUAGES}) GETTEXT_PROCESS_PO_FILES(${LANG} ALL PO_FILES ${LANG}.po) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${DATADIR}/locale/${LANG}/LC_MESSAGES" + DESTINATION "${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES" RENAME "${GETTEXT_PACKAGE}.mo") endforeach () endif()
M themes/CMakeLists.txtthemes/CMakeLists.txt

@@ -1,2 +1,2 @@

file( GLOB EXTRATHEMEFILES *.tint2rc ) -install( FILES ${EXTRATHEMEFILES} DESTINATION ${DATADIR}/tint2 ) +install( FILES ${EXTRATHEMEFILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/tint2 )