Only update resolv.conf if changed (avoid logspam)
[project/netifd.git] / CMakeLists.txt
index 4ef4dfa..2076fc9 100644 (file)
@@ -18,8 +18,9 @@ SET(SOURCES
        ubus.c)
 
 
+find_library(json NAMES json-c json)
 SET(LIBS
-       ubox ubus uci json blobmsg_json)
+       ubox ubus uci ${json} blobmsg_json)
 
 IF (NOT DEFINED LIBNL_LIBS)
   SET(LIBNL_LIBS -lnl)
@@ -35,6 +36,9 @@ ENDIF()
 
 IF(DEBUG)
   ADD_DEFINITIONS(-DDEBUG -g3)
+  IF(NO_OPTIMIZE)
+    ADD_DEFINITIONS(-O0)
+  ENDIF()
 ENDIF()