2 cmake_minimum_required(VERSION 2.6)
4 include( FindPkgConfig )
5 pkg_check_modules( X11 REQUIRED x11 xcomposite xdamage xinerama xrender xrandr )
6 pkg_check_modules( PANGOCAIRO REQUIRED pangocairo )
7 pkg_check_modules( PANGO REQUIRED pango )
8 pkg_check_modules( CAIRO REQUIRED cairo )
9 pkg_check_modules( GLIB2 REQUIRED glib-2.0 )
10 pkg_check_modules( GOBJECT2 REQUIRED gobject-2.0 )
11 pkg_check_modules( IMLIB2 REQUIRED imlib2 )
13 include_directories( src
21 ${PANGOCAIRO_INCLUDE_DIRS}
25 ${GOBJECT2_INCLUDE_DIRS}
26 ${IMLIB2_INCLUDE_DIRS} )
28 set(SOURCES src/config.c
33 src/systray/systraybar.c
42 option( ENABLE_BATTERY "Enable battery support in tint2" OFF )
44 set( SOURCES ${SOURCES} src/battery/battery.c )
45 add_definitions( -DENABLE_BATTERY )
46 endif( ENABLE_BATTERY )
48 option( ENABLE_TINT2CONF "Enable tint2conf. A tint2 theme switcher" ON )
49 if ( ENABLE_TINT2CONF )
50 add_subdirectory( src/tint2conf )
51 endif( ENABLE_TINT2CONF )
54 add_executable(tint2 ${SOURCES})
55 target_link_libraries( tint2 ${X11_LIBRARIES}
56 ${PANGOCAIRO_LIBRARIES}
64 install(TARGETS tint2 DESTINATION bin)