forked from openwrt/omcproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (21 loc) · 900 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 2.8.8)
project(omcproxy C)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=c99")
add_definitions(-D_GNU_SOURCE -Wall -Wno-gnu)
if(${L_LEVEL})
add_definitions(-DL_LEVEL=${L_LEVEL})
endif(${L_LEVEL})
FIND_PATH(ubox_include_dir libubox/list.h)
INCLUDE_DIRECTORIES(${ubox_include_dir})
if(WITH_LIBUBOX)
add_definitions(-Wextra)
set(PLATFORM_LINK ${PLATFORM_LINK} ubox)
else (WITH_LIBUBOX)
add_definitions(-Dtypeof=__typeof)
include_directories(BEFORE .)
set(PLATFORM_SOURCE ${PLATFORM_SOURCE} libubox/uloop.c libubox/avl.c libubox/blobmsg.c libubox/blob.c)
endif(WITH_LIBUBOX)
add_executable(omcproxy src/client.c src/mrib.c src/querier.c src/groups.c src/igmp.c src/mld.c src/proxy.c src/omcproxy.c ${PLATFORM_SOURCE})
target_link_libraries(omcproxy ${PLATFORM_LINK})
install(TARGETS omcproxy DESTINATION sbin/)