X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftint2;a=blobdiff_plain;f=CMakeLists.txt;fp=CMakeLists.txt;h=3b5a0f30ce92d620ebb1620e823b6c78420a6b42;hp=c687ab3687d63209fc945e9d3a8d0ac4f4cd0de2;hb=d753ad772192bbcaa656c172b0405f7be2de7b24;hpb=460902abc1d5b34c6ea4c9492369533d3ec216d9 diff --git a/CMakeLists.txt b/CMakeLists.txt index c687ab3..3b5a0f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 )