X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftint2;a=blobdiff_plain;f=CMakeLists.txt;h=483834e1c160b5d7800483a303173e32c2945abc;hp=8ef88ad809b2da30d38d43d82e9fbf0c373d5021;hb=bbec33ce1a15b555a737f2fefe7bdfb6a8881705;hpb=7c0dfec2441c4a7da72150978425b6594a2b91a5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ef88ad..483834e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,12 @@ pkg_check_modules( GOBJECT2 REQUIRED gobject-2.0 ) pkg_check_modules( IMLIB2 REQUIRED imlib2 ) 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 ) + message( FATAL_ERROR "Not all dependencies fulfilled. See http://code.google.com/p/tint2/wiki/Install" ) +endif( 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 ) + +string( REPLACE ";" " " FLAGS_REPLACED "${IMLIB2_LDFLAGS}" ) +set( CMAKE_REQUIRED_FLAGS "${FLAGS_REPLACED}" ) check_library_exists( "${IMLIB2_LIBRARIES}" "imlib_context_set_display" "${IMLIB2_LIBRARY_DIRS}" IMLIB_BUILD_WITH_X ) if( NOT IMLIB_BUILD_WITH_X ) message( FATAL_ERROR "Imlib is not build with x support" ) @@ -23,6 +29,7 @@ include_directories( ${PROJECT_BINARY_DIR} src/clock src/systray src/taskbar + src/launcher src/tooltip src/util ${X11_INCLUDE_DIRS} @@ -39,6 +46,7 @@ set( SOURCES src/config.c src/tint.c src/clock/clock.c src/systray/systraybar.c + src/launcher/launcher.c src/taskbar/task.c src/taskbar/taskbar.c src/tooltip/tooltip.c @@ -69,15 +77,14 @@ set( DOCDIR share/doc/tint2 CACHE PATH "Directory for documentation files" ) add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_svnrev.sh" "\"${PROJECT_SOURCE_DIR}\"" ) -add_executable(tint2 ${SOURCES}) link_directories( ${X11_LIBRARY_DIRS} - ${X11_LIBRARY_DIRS} ${PANGOCAIRO_LIBRARY_DIRS} ${PANGO_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${GOBJECT2_LIBRARY_DIRS} ${IMLIB2_LIBRARY_DIRS} ) +add_executable(tint2 ${SOURCES}) target_link_libraries( tint2 ${X11_LIBRARIES} ${PANGOCAIRO_LIBRARIES} ${PANGO_LIBRARIES} @@ -90,8 +97,8 @@ if( RT_LIBRARY ) endif( RT_LIBRARY ) add_dependencies( tint2 version ) -set_target_properties( tint2 PROPERTIES COMPILE_FLAGS -Wall ) -#set_target_properties(tint2 PROPERTIES LINK_FLAGS -Wl,--as-needed) +set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -pthread" ) +set_target_properties(tint2 PROPERTIES LINK_FLAGS "-pthread" ) install( TARGETS tint2 DESTINATION bin ) install( FILES sample/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 )