2010-06-08 20:18:13 +00:00
|
|
|
project(tint2conf)
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
include( FindPkgConfig )
|
2015-02-19 19:36:13 +00:00
|
|
|
pkg_check_modules( X11_T2C REQUIRED x11 xcomposite xdamage xinerama xrender xrandr>=1.3 )
|
2010-06-08 20:18:13 +00:00
|
|
|
pkg_check_modules( GLIB2 REQUIRED glib-2.0 )
|
|
|
|
pkg_check_modules( GOBJECT2 REQUIRED gobject-2.0 )
|
|
|
|
pkg_check_modules( IMLIB2 REQUIRED imlib2 )
|
|
|
|
pkg_check_modules( GTHREAD2 REQUIRED gthread-2.0 )
|
|
|
|
pkg_check_modules( GTK2 REQUIRED gtk+-x11-2.0 )
|
2015-01-28 15:31:20 +00:00
|
|
|
pkg_check_modules( RSVG librsvg-2.0>=2.36.0 )
|
2010-06-08 20:18:13 +00:00
|
|
|
|
|
|
|
include_directories( ../util
|
2010-06-14 06:20:41 +00:00
|
|
|
${X11_T2C_INCLUDE_DIRS}
|
2010-06-08 20:18:13 +00:00
|
|
|
${GLIB2_INCLUDE_DIRS}
|
|
|
|
${GOBJECT2_INCLUDE_DIRS}
|
|
|
|
${IMLIB2_INCLUDE_DIRS}
|
|
|
|
${GTHREAD2_INCLUDE_DIRS}
|
2015-01-28 15:31:20 +00:00
|
|
|
${GTK2_INCLUDE_DIRS}
|
|
|
|
${RSVG_INCLUDE_DIRS} )
|
2010-06-08 20:18:13 +00:00
|
|
|
|
|
|
|
set(SOURCES ../util/common.c
|
2016-03-01 19:59:13 +00:00
|
|
|
../util/strnatcmp.c
|
|
|
|
../util/cache.c
|
|
|
|
../config.c
|
2015-01-28 15:31:20 +00:00
|
|
|
../server.c
|
|
|
|
../launcher/apps-common.c
|
|
|
|
../launcher/icon-theme-common.c
|
2010-06-08 20:18:13 +00:00
|
|
|
main.c
|
2010-06-12 22:17:45 +00:00
|
|
|
properties.c
|
2011-06-06 09:16:51 +00:00
|
|
|
properties_rw.c
|
2010-06-08 20:18:13 +00:00
|
|
|
theme_view.c )
|
2015-01-28 15:31:20 +00:00
|
|
|
|
|
|
|
add_definitions( -DTINT2CONF )
|
|
|
|
|
|
|
|
option( ENABLE_RSVG "Rsvg support (launcher only)" ON )
|
|
|
|
|
|
|
|
if( ENABLE_RSVG )
|
|
|
|
if( RSVG_FOUND )
|
|
|
|
add_definitions( -DHAVE_RSVG )
|
|
|
|
endif( RSVG_FOUND )
|
|
|
|
endif( ENABLE_RSVG )
|
|
|
|
|
2010-06-14 06:20:41 +00:00
|
|
|
link_directories( ${X11_T2C_LIBRARY_DIRS}
|
2010-06-13 13:02:53 +00:00
|
|
|
${GLIB2_LIBRARY_DIRS}
|
|
|
|
${GOBJECT2_LIBRARY_DIRS}
|
|
|
|
${IMLIB2_LIBRARY_DIRS}
|
|
|
|
${GTHREAD2_LIBRARY_DIRS}
|
2015-01-28 15:31:20 +00:00
|
|
|
${GTK2_LIBRARY_DIRS}
|
|
|
|
${RSVG_LIBRARY_DIRS} )
|
2010-06-08 20:18:13 +00:00
|
|
|
add_executable( tint2conf ${SOURCES} )
|
2010-06-14 06:20:41 +00:00
|
|
|
target_link_libraries( tint2conf ${X11_T2C_LIBRARIES}
|
2010-06-08 20:18:13 +00:00
|
|
|
${GLIB2_LIBRARIES}
|
|
|
|
${GOBJECT2_LIBRARIES}
|
|
|
|
${IMLIB2_LIBRARIES}
|
|
|
|
${GTHREAD2_LIBRARIES}
|
2015-01-28 15:31:20 +00:00
|
|
|
${GTK2_LIBRARIES}
|
|
|
|
${RSVG_LIBRARIES} )
|
2010-06-08 20:18:13 +00:00
|
|
|
|
2010-11-06 22:22:48 +00:00
|
|
|
if ( NOT DATADIR )
|
2015-05-21 10:34:52 +00:00
|
|
|
set(DATADIR share)
|
2010-11-06 22:22:48 +00:00
|
|
|
endif( NOT DATADIR )
|
|
|
|
|
2010-06-12 21:21:06 +00:00
|
|
|
add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" )
|
2015-05-21 10:34:52 +00:00
|
|
|
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/${DATADIR}/locale\" )
|
|
|
|
add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" )
|
2015-12-10 17:08:18 +00:00
|
|
|
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c99" )
|
2010-06-14 06:20:41 +00:00
|
|
|
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
|
2010-06-09 09:14:56 +00:00
|
|
|
|
2015-05-21 10:34:52 +00:00
|
|
|
add_subdirectory(po)
|
|
|
|
|
2010-06-08 20:18:13 +00:00
|
|
|
install( TARGETS tint2conf DESTINATION bin )
|
2015-05-03 17:17:24 +00:00
|
|
|
install( FILES tint2conf.svg DESTINATION ${DATADIR}/icons/hicolor/scalable/apps )
|
2010-11-18 20:29:30 +00:00
|
|
|
install( FILES tint2conf.desktop DESTINATION ${DATADIR}/applications )
|
2010-11-06 22:22:48 +00:00
|
|
|
install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" )
|