]> Dogcows Code - chaz/tint2/blobdiff - CMakeLists.txt
*add* use ACPI api for freebsd (thx to yamagi.burmeister)
[chaz/tint2] / CMakeLists.txt
index 4b40a6c8f207f0887fd29cfab3c84555d5f39d63..496f9f78cd2fb4a82141b0cf9ec0c4ed561e4901 100644 (file)
@@ -12,7 +12,11 @@ pkg_check_modules( GOBJECT2 REQUIRED gobject-2.0 )
 pkg_check_modules( IMLIB2 REQUIRED imlib2 )
 find_library( RT_LIBRARY rt )
 
-string( REPLACE ";" " " FLAGS_REPLACED "${FLAGS}" )
+if( NOT (X11_FOUND AND PANGOCAIRO_FOUND AND PANGO_FOUND AND CAIRO_FOUND AND GLIB2_FOUND AND GOBJECT2_FOUND AND IMLIB2_FOUND) )
+  message( FATAL_ERROR "Not all dependencies fulfilled. See http://code.google.com/p/tint2/wiki/Install" )
+endif( NOT (X11_FOUND AND PANGOCAIRO_FOUND AND PANGO_FOUND AND CAIRO_FOUND AND GLIB2_FOUND AND GOBJECT2_FOUND AND 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 )
@@ -71,15 +75,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}
@@ -92,8 +95,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 )
This page took 0.020999 seconds and 4 git commands to generate.