20 ## User settable options |
20 ## User settable options |
21 |
21 |
22 ## Check for build dependencies |
22 ## Check for build dependencies |
23 find_package(PkgConfig REQUIRED) |
23 find_package(PkgConfig REQUIRED) |
24 pkg_check_modules(GLIB REQUIRED glib-2.0) |
24 pkg_check_modules(GLIB REQUIRED glib-2.0) |
25 pkg_check_modules(GMODULE REQUIRED gmodule-2.0) |
|
26 pkg_check_modules(LM REQUIRED loudmouth-1.0) |
25 pkg_check_modules(LM REQUIRED loudmouth-1.0) |
27 pkg_check_modules(MCABBER REQUIRED mcabber) |
26 pkg_check_modules(MCABBER REQUIRED mcabber) |
28 include(CheckSymbolExists) |
27 include(CheckSymbolExists) |
29 set(CMAKE_REQUIRED_INCLUDES ${LM_INCLUDE_DIRS}) |
28 set(CMAKE_REQUIRED_INCLUDES ${LM_INCLUDE_DIRS}) |
30 set(CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES}) |
29 set(CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES}) |
31 set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS}) |
30 set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS}) |
32 check_symbol_exists(lm_connection_unregister_reply_handler loudmouth/loudmouth.h HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER) |
31 check_symbol_exists(lm_connection_unregister_reply_handler loudmouth/loudmouth.h HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER) |
33 link_directories(${GLIB_LIBRARY_DIRS} |
32 link_directories(${GLIB_LIBRARY_DIRS} |
34 ${GMODULE_LIBRARY_DIRS} |
|
35 ${LM_LIBRARY_DIRS} |
33 ${LM_LIBRARY_DIRS} |
36 ${MCABBER_LIBRARY_DIRS}) |
34 ${MCABBER_LIBRARY_DIRS}) |
37 |
35 |
38 ## Target definitions |
36 ## Target definitions |
39 add_library(disco MODULE disco.c) |
37 add_library(disco MODULE disco.c) |
40 |
38 |
41 ## Compiler setup |
39 ## Compiler setup |
42 configure_file(config.h.in config.h) |
40 configure_file(config.h.in config.h) |
43 include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} |
41 include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} |
44 ${GMODULE_INCLUDE_DIRS} |
|
45 ${LM_INCLUDE_DIRS} |
42 ${LM_INCLUDE_DIRS} |
46 ${MCABBER_INCLUDE_DIRS}) |
43 ${MCABBER_INCLUDE_DIRS}) |
47 target_link_libraries(disco ${GLIB_LIBRARIES} |
44 target_link_libraries(disco ${GLIB_LIBRARIES} |
48 ${GMODULE_LIBRARIES} |
|
49 ${LM_LIBRARIES} |
45 ${LM_LIBRARIES} |
50 ${MCABBER_LIBRARIES}) |
46 ${MCABBER_LIBRARIES}) |
51 include_directories(${disco_SOURCE_DIR} |
47 include_directories(${disco_SOURCE_DIR} |
52 ${disco_BINARY_DIR}) |
48 ${disco_BINARY_DIR}) |
53 |
49 |