]> Dogcows Code - chaz/tint2/commitdiff
*fix* do not set LDFLAGS to --as-needed because this changes building behaviour which...
authorAndreas Fink <andreas.fink85@googlemail.com>
Sat, 12 Jun 2010 07:45:16 +0000 (07:45 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Sat, 12 Jun 2010 07:45:16 +0000 (07:45 +0000)
*fix* link librt only if it is found (issue 261)

CMakeLists.txt
src/tint2conf/CMakeLists.txt

index e527a7698e89e0312f3170f035bf3d5e1cb39e33..f4a628ca7b5e83064d8ab574c9fd94088d830eeb 100644 (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 )
+find_library( RT_LIBRARY rt )
 
 check_library_exists( "${IMLIB2_LIBRARIES}" "imlib_context_set_display" "${IMLIB2_LIBRARY_DIRS}" IMLIB_BUILD_WITH_X )
 if( NOT IMLIB_BUILD_WITH_X )
@@ -61,7 +62,6 @@ if( ENABLE_TINT2CONF )
   add_dependencies( tint2conf version )
 endif( ENABLE_TINT2CONF )
 
-
 set( MANDIR ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "Directory for man pages" )
 set( DATADIR ${CMAKE_INSTALL_PREFIX}/share CACHE PATH "Directory for shared data" )
 set( SYSCONFDIR /etc CACHE PATH "Directory for configuration files" )
@@ -84,12 +84,14 @@ target_link_libraries( tint2 ${X11_LIBRARIES}
                              ${CAIRO_LIBRARIES}
                              ${GLIB2_LIBRARIES}
                              ${GOBJECT2_LIBRARIES}
-                             ${IMLIB2_LIBRARIES}
-                             rt )
+                             ${IMLIB2_LIBRARIES} )
+if( RT_LIBRARY )
+  target_link_libraries( tint2 ${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 LINK_FLAGS -Wl,--as-needed)
 
 install( TARGETS tint2 DESTINATION bin )
 install( FILES sample/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 )
index 03b032be367e9dbd19a026a5c76bc3fff09c0dff..382bbc3a43949e29372c65baf6d61f39f9a337e7 100644 (file)
@@ -29,7 +29,7 @@ target_link_libraries( tint2conf ${X11_LIBRARIES}
                                  ${GTK2_LIBRARIES} )
 
 set_target_properties(tint2conf PROPERTIES COMPILE_FLAGS -Wall)
-set_target_properties(tint2conf PROPERTIES LINK_FLAGS -Wl,--as-needed)
+#set_target_properties(tint2conf PROPERTIES LINK_FLAGS -Wl,--as-needed)
 
 install( TARGETS tint2conf DESTINATION bin )
 install( PROGRAMS tintwizard.py DESTINATION bin )
This page took 0.026177 seconds and 4 git commands to generate.