]> Dogcows Code - chaz/tint2/blobdiff - CMakeLists.txt
*fix* use relative path for DOCDIR/MANDIR/DATADIR (a change in CMAKE_INSTALL_PREFIX...
[chaz/tint2] / CMakeLists.txt
index d10ea3e1f0b4585cb7287d7b382e264219bcfe5d..a5ded33adf754d8084430f8ca16fcf6796fb890b 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,11 +62,10 @@ 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( MANDIR share/man CACHE PATH "Directory for man pages" )
+set( DATADIR share CACHE PATH "Directory for shared data" )
 set( SYSCONFDIR /etc CACHE PATH "Directory for configuration files" )
-set( DOCDIR ${CMAKE_INSTALL_PREFIX}/share/doc/tint2 CACHE PATH "Directory for documentation files" )
+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}\"" )
 
@@ -84,17 +84,20 @@ 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)
+add_dependencies( tint2 version )
+set_target_properties( tint2 PROPERTIES COMPILE_FLAGS -Wall )
+#set_target_properties(tint2 PROPERTIES LINK_FLAGS -Wl,--as-needed)
 
 install( TARGETS tint2 DESTINATION bin )
 install( FILES sample/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 )
 install( FILES default_icon.png DESTINATION ${DATADIR}/tint2 )
 install( FILES AUTHORS ChangeLog README DESTINATION ${DOCDIR} )
+install( FILES doc/tint2.1 DESTINATION ${MANDIR}/man1 )
 if( ENABLE_EXAMPLES )
   file( GLOB SAMPLEFILES sample/*.tint2rc )
   install( FILES ${SAMPLEFILES} DESTINATION ${DOCDIR}/examples )
This page took 0.0219 seconds and 4 git commands to generate.