projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
78637a9
)
add OS switch to select system library
author
Steven Barth
<steven@midlink.org>
Thu, 22 Sep 2011 20:34:38 +0000
(20:34 +0000)
committer
Steven Barth
<steven@midlink.org>
Thu, 22 Sep 2011 20:34:38 +0000
(20:34 +0000)
CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
6da39df
..
de0c74b
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-10,15
+10,26
@@
IF(APPLE)
LINK_DIRECTORIES(/opt/local/lib)
ENDIF()
LINK_DIRECTORIES(/opt/local/lib)
ENDIF()
+SET(SOURCES
+ main.c utils.c interface.c interface-ip.c
+ proto.c proto-static.c proto-shell.c
+ config.c device.c bridge.c vlan.c ubus.c)
+
+SET(LIBS
+ ubox ubus uci json blobmsg_json)
+
+IF("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+ SET(SOURCES ${SOURCES} system-linux.c)
+ SET(LIBS ${LIBS} nl)
+ELSE()
+ SET(SOURCES ${SOURCES} system-dummy.c)
+ENDIF()
+
IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -O0 --std=gnu99 -g3)
ENDIF()
IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -O0 --std=gnu99 -g3)
ENDIF()
-ADD_EXECUTABLE(netifd
- main.c utils.c interface.c interface-ip.c
- proto.c proto-static.c proto-shell.c
- config.c device.c bridge.c vlan.c ubus.c
- system-dummy.c)
+ADD_EXECUTABLE(netifd ${SOURCES})
-TARGET_LINK_LIBRARIES(netifd
ubox ubus uci json blobmsg_json
)
+TARGET_LINK_LIBRARIES(netifd
${LIBS}
)