Adding startup-notification support.

git-svn-id: http://tint2.googlecode.com/svn/trunk@650 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
xico.atelo@gmail.com
2012-07-02 16:50:30 +00:00
parent 13b0d7612a
commit cfa4bc89e1
5 changed files with 146 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ pkg_check_modules( CAIRO REQUIRED cairo )
pkg_check_modules( GLIB2 REQUIRED glib-2.0 )
pkg_check_modules( GOBJECT2 REQUIRED gobject-2.0 )
pkg_check_modules( IMLIB2 REQUIRED imlib2>=1.4.2 )
pkg_check_modules( SN libstartup-notification-1.0>=0.12 )
find_library( RT_LIBRARY rt )
if( NOT X11_FOUND OR NOT PANGOCAIRO_FOUND OR NOT PANGO_FOUND OR NOT CAIRO_FOUND OR NOT GLIB2_FOUND OR NOT GOBJECT2_FOUND OR NOT IMLIB2_FOUND )
@@ -38,7 +39,8 @@ include_directories( ${PROJECT_BINARY_DIR}
${CAIRO_INCLUDE_DIRS}
${GLIB2_INCLUDE_DIRS}
${GOBJECT2_INCLUDE_DIRS}
${IMLIB2_INCLUDE_DIRS} )
${IMLIB2_INCLUDE_DIRS}
${SN_INCLUDE_DIRS} )
set( SOURCES src/config.c
src/panel.c
@@ -61,6 +63,12 @@ set( SOURCES src/config.c
option( ENABLE_BATTERY "Enable battery status plugin" ON )
option( ENABLE_TINT2CONF "Enable tint2conf build, a GTK+2 theme switcher for tint2" ON )
option( ENABLE_EXAMPLES "Install additional tin2rc examples" OFF )
option( ENABLE_SN "Startup notification support" ON )
if( ENABLE_SN )
if( SN_FOUND )
add_definitions( -DHAVE_SN -DSN_API_NOT_YET_FROZEN )
endif( SN_FOUND )
endif( ENABLE_SN)
if( ENABLE_BATTERY )
set( SOURCES ${SOURCES} src/battery/battery.c )
@@ -86,7 +94,8 @@ link_directories( ${X11_LIBRARY_DIRS}
${CAIRO_LIBRARY_DIRS}
${GLIB2_LIBRARY_DIRS}
${GOBJECT2_LIBRARY_DIRS}
${IMLIB2_LIBRARY_DIRS} )
${IMLIB2_LIBRARY_DIRS}
${SN_LIBRARY_DIRS} )
add_executable(tint2 ${SOURCES})
target_link_libraries( tint2 ${X11_LIBRARIES}
${PANGOCAIRO_LIBRARIES}
@@ -94,7 +103,8 @@ target_link_libraries( tint2 ${X11_LIBRARIES}
${CAIRO_LIBRARIES}
${GLIB2_LIBRARIES}
${GOBJECT2_LIBRARIES}
${IMLIB2_LIBRARIES} )
${IMLIB2_LIBRARIES}
${SN_LIBRARIES} )
if( RT_LIBRARY )
target_link_libraries( tint2 ${RT_LIBRARY} )
endif( RT_LIBRARY )