CMakeLists.txt
changeset 59 50173578fddc
parent 56 f0e3c123d506
child 61 b0b6e8307e38
--- a/CMakeLists.txt	Mon Aug 20 22:51:51 2012 +0300
+++ b/CMakeLists.txt	Thu Oct 18 22:47:45 2012 +0300
@@ -30,6 +30,17 @@
 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)
 link_directories(${GLIB_LIBRARY_DIRS}
 				 ${LM_LIBRARY_DIRS}
 				 ${MCABBER_LIBRARY_DIRS})
@@ -69,6 +80,11 @@
 set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
 include(CPack)
 
+if(HAVE_MCABBER_COMPLETION_FLAGS)
+		set(AVV_COMPL_VERSION "compl:4")
+else()
+		set(AVV_COMPL_VERSION "compl:2 | compl:3")
+endif()
 configure_file(disco.avv.in disco.avv)
 
 ## Installation