X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=CMakeLists.txt;h=a6e228a05ec8b41c73ee4985340428f6b5784d73;hp=8fb8ae15a5baf90ab00ccd5d41fcf070aa919998;hb=be8f32edac81aa4d5c24c1cfa109c23c48827997;hpb=216f718323126aa5b89b820363c20f49488cbba1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fb8ae1..a6e228a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,16 +11,21 @@ IF(APPLE) ENDIF() SET(SOURCES - main.c utils.c interface.c interface-ip.c + main.c utils.c + interface.c interface-ip.c interface-event.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") +IF (NOT DEFINED LIBNL_LIBS) + SET(LIBNL_LIBS -lnl) +ENDIF() + +IF("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND NOT DUMMY_MODE) SET(SOURCES ${SOURCES} system-linux.c) - SET(LIBS ${LIBS} nl) + SET(LIBS ${LIBS} ${LIBNL_LIBS}) ELSE() ADD_DEFINITIONS(-DDUMMY_MODE=1) SET(SOURCES ${SOURCES} system-dummy.c)