--- a/CMakeLists.txt Sun Feb 17 06:58:49 2013 +0200
+++ b/CMakeLists.txt Thu Nov 13 18:50:18 2014 +0200
@@ -30,17 +30,11 @@
set(CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES})
set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS})
check_symbol_exists(lm_connection_unregister_reply_handler loudmouth/loudmouth.h HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER)
-include(CheckCSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES ${MCABBER_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${MCABBER_LIBRARIES})
set(CMAKE_REQUIRED_FLAGS ${MCABBER_LDFLAGS} ${MCABBER_CFLAGS})
-check_c_source_compiles("
- #include <glib.h>
- #include <mcabber/api.h>
- #ifdef MCABBER_API_HAVE_COMPL_FLAGS
- int main (void) { return 0; }
- #endif
- " HAVE_MCABBER_COMPLETION_FLAGS)
+check_symbol_exists(MCABBER_API_HAVE_COMPL_FLAGS mcabber/api.h HAVE_MCABBER_COMPLETION_FLAGS)
+check_symbol_exists(MCABBER_API_HAVE_CMD_ID mcabber/api.h HAVE_MCABBER_CMD_ID)
link_directories(${GLIB_LIBRARY_DIRS}
${LM_LIBRARY_DIRS}
${MCABBER_LIBRARY_DIRS})
@@ -80,10 +74,16 @@
set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
include(CPack)
+## AVV build-time dependent requirements
if(HAVE_MCABBER_COMPLETION_FLAGS)
- set(AVV_COMPL_VERSION "compl:4")
+ set(AVV_COMPL_VERSION "compl:6 | compl:5 | compl:4")
else()
- set(AVV_COMPL_VERSION "compl:2 | compl:3")
+ set(AVV_COMPL_VERSION "compl:3 | compl:2")
+endif()
+if(HAVE_MCABBER_CMD_ID)
+ set(AVV_COMMANDS_VERSION "commands:5 | commands:4 | commands:3")
+else()
+ set(AVV_COMMANDS_VERSION "commands:2 | commands:1")
endif()
configure_file(disco.avv.in disco.avv)
@@ -94,4 +94,4 @@
install(DIRECTORY help DESTINATION share/mcabber)
install(FILES ${PROJECT_BINARY_DIR}/disco.avv DESTINATION share/mcabber/avv/modules RENAME disco)
-## The End ## vim: se ts=4: ##
+## The End ## vim: se ts=4 sw=4: ##