summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 839f47f..380d633 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,12 @@ if(${UBUS})
set(EXT_LINK ${EXT_LINK} ubus)
endif(${UBUS})
-add_executable(odhcpd src/odhcpd.c src/config.c src/router.c src/dhcpv6.c src/ndp.c src/dhcpv6-ia.c src/dhcpv4.c src/netlink.c ${EXT_SRC})
+if(${DHCPV4_SUPPORT})
+ add_definitions(-DDHCPV4_SUPPORT)
+ set(EXT_SRC ${EXT_SRC} src/dhcpv4.c)
+endif(${DHCPV4_SUPPORT})
+
+add_executable(odhcpd src/odhcpd.c src/config.c src/router.c src/dhcpv6.c src/ndp.c src/dhcpv6-ia.c src/netlink.c ${EXT_SRC})
target_link_libraries(odhcpd resolv ubox uci ${libnl} ${EXT_LINK})
# Installation