2
|
1 |
|
|
2 |
cmake_minimum_required(VERSION 2.6) |
|
3 |
|
|
4 |
# Define targets |
|
5 |
add_library(loudmouth MODULE util.c lm_types.c lm_proxy.c lm_ssl.c lm_connection.c lm_message.c lm_message_node.c lm_message_handler.c lm.c) |
|
6 |
add_library(glib MODULE glib.c glib_types.c glib_main_context.c glib_source.c glib_timeout.c util.c) |
|
7 |
|
|
8 |
# Check for dependencies |
|
9 |
find_package(ZLIB REQUIRED) |
|
10 |
|
|
11 |
find_package(Lua51 REQUIRED) |
|
12 |
|
|
13 |
find_package(PkgConfig REQUIRED) |
|
14 |
pkg_check_modules(LM REQUIRED loudmouth-1.0) |
|
15 |
pkg_check_modules(GLIB REQUIRED glib-2.0) |
|
16 |
|
|
17 |
# Set building options |
|
18 |
include_directories(SYSTEM ${LUA_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS} ${LM_INCLUDE_DIRS}) |
|
19 |
target_link_libraries(loudmouth ${LUA_LIBRARIES} ${GLIB_LIBRARIES} ${LM_LIBRARIES}) |
|
20 |
target_link_libraries(glib ${LUA_LIBRARIES} ${GLIB_LIBRARIES}) |
|
21 |
set_target_properties(loudmouth glib PROPERTIES PREFIX "") |
|
22 |
|