--- a/CMakeLists.txt Fri Mar 05 19:15:08 2010 +0200
+++ b/CMakeLists.txt Fri Mar 05 19:49:09 2010 +0200
@@ -22,7 +22,6 @@
option(DEBUG "Enable debugging output" ON)
option(LLM_CONNECTION_ENABLE "Enable exposing of mcabber loudmouth connection to lua" ON)
option(LLM_LOG_HANDLER "Enable registration of log messages handler for lua-loudmouth library's messages" ON)
-set(MCABBER_INCLUDE_DIR "/usr/include" CACHE FILEPATH "Path to mcabber headers")
set(ML_SOURCE_PRIORITY G_PRIORITY_HIGH_IDLE CACHE STRING "Glib event source priority for timeout and bgread")
set(ML_BGREAD_BUFFER 4096 CACHE STRING "Background pipe reading buffer size")
@@ -31,34 +30,31 @@
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GMODULE REQUIRED gmodule-2.0)
-# XXX: we need only headers
-if(LLM_CONNECTION_ENABLE)
- pkg_check_modules(LM REQUIRED loudmouth-1.0)
-endif()
+pkg_check_modules(MCABBER REQUIRED mcabber)
find_package(Perl)
link_directories(${GLIB_LIBRARY_DIRS}
${GMODULE_LIBRARY_DIRS}
- ${LM_LIBRARY_DIRS})
+ ${MCABBER_LIBRARY_DIRS})
## Define targets
add_library(lua MODULE main.c util.c)
-get_target_property(lua_SOURCES lua SOURCES)
## Set up compiler
configure_file(config.h.in config.h ESCAPE_QUOTES)
include_directories(SYSTEM ${LUA_INCLUDE_DIR}
${GLIB_INCLUDE_DIRS}
${GMODULE_INCLUDE_DIRS}
- ${LM_INCLUDE_DIRS}
- ${MCABBER_INCLUDE_DIR})
+ ${MCABBER_INCLUDE_DIRS})
target_link_libraries(lua ${LUA_LIBRARIES}
${GLIB_LIBRARIES}
- ${GMODULE_LIBRARIES})
+ ${GMODULE_LIBRARIES}
+ ${MCABBER_LIBRARRIES})
include_directories(${lua_SOURCE_DIR}
${lua_BINARY_DIR})
## Extra targets
if(PERL_FOUND)
+ get_target_property(lua_SOURCES lua SOURCES)
add_custom_command(OUTPUT ${lua_BINARY_DIR}/lua.html COMMAND ${PERL_EXECUTABLE} ${lua_SOURCE_DIR}/docgen.pl ${lua_SOURCES} > ${lua_BINARY_DIR}/lua.html DEPENDS ${lua_SOURCE_DIR}/docgen.pl ${lua_SOURCES} WORKING_DIRECTORY ${lua_SOURCE_DIR})
add_custom_target(doc ALL DEPENDS ${lua_BINARY_DIR}/lua.html)
endif()