CMakeLists.txt
changeset 13 88315b883803
parent 12 bc6d4169afdb
child 14 706e77af2947
--- a/CMakeLists.txt	Wed Jan 20 21:43:21 2010 +0200
+++ b/CMakeLists.txt	Mon Feb 15 17:46:56 2010 +0200
@@ -18,31 +18,27 @@
 project(cmd C) 
 
 ## User settable options
-set(MCABBER_INCLUDE_DIR "/usr/include" CACHE FILEPATH "Path to mcabber headers") 
  
 ## Check for build dependencies
 find_package(PkgConfig REQUIRED) 
 pkg_check_modules(GLIB REQUIRED glib-2.0) 
 pkg_check_modules(GMODULE REQUIRED gmodule-2.0) 
-pkg_check_modules(LM REQUIRED loudmouth-1.0) 
-find_program(GREP_EXECUTABLE grep DOC "Grep binary to find functions in headers")
-if(GREP_EXECUTABLE)
-	execute_process(COMMAND ${GREP_EXECUTABLE} xmpp_is_online ${MCABBER_INCLUDE_DIR}/mcabber/xmpp.h OUTPUT_VARIABLE HAVE_XMPP_IS_ONLINE ERROR_QUIET)
-endif()
+pkg_check_modules(MCABBER REQUIRED mcabber)
 link_directories(${GLIB_LIBRARY_DIRS}
-				 ${GMODULE_LIBRARY_DIRS})
+				 ${GMODULE_LIBRARY_DIRS}
+				 ${MCABBER_LIBRARY_DIRS})
 
 ## Target definitions
 add_library(cmd MODULE cmd.c) 
 
 ## Compiler setup
-configure_file(config.h.in config.h)
 include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} 
                     ${GMODULE_INCLUDE_DIRS} 
                     ${LM_INCLUDE_DIRS}
-                    ${MCABBER_INCLUDE_DIR})
+                    ${MCABBER_INCLUDE_DIRS})
 target_link_libraries(cmd ${GLIB_LIBRARIES} 
-                      ${GMODULE_LIBRARIES}) 
+                      ${GMODULE_LIBRARIES}
+					  ${MCABBER_LIBRARIES})
 include_directories(${cmd_SOURCE_DIR} 
                     ${cmd_BINARY_DIR})