add a system object that allows us to set passwords and trigger sysupgrade
[project/rpcd.git] / CMakeLists.txt
index f1e283d..60959d5 100644 (file)
@@ -8,6 +8,7 @@ INCLUDE_DIRECTORIES(include)
 
 OPTION(FILE_SUPPORT "File plugin support" ON)
 OPTION(IWINFO_SUPPORT "libiwinfo plugin support" ON)
+OPTION(RPCSYS_SUPPORT "rpc-sys plugin support" ON)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 
@@ -39,6 +40,13 @@ IF(FILE_SUPPORT)
   SET_TARGET_PROPERTIES(file_plugin PROPERTIES OUTPUT_NAME file PREFIX "")
 ENDIF()
 
+IF(RPCSYS_SUPPORT)
+  SET(PLUGINS ${PLUGINS} rpcsys_plugin)
+  ADD_LIBRARY(rpcsys_plugin MODULE sys.c)
+  TARGET_LINK_LIBRARIES(rpcsys_plugin ubox ubus)
+  SET_TARGET_PROPERTIES(rpcsys_plugin PROPERTIES OUTPUT_NAME rpcsys PREFIX "")
+ENDIF()
+
 IF (IWINFO_SUPPORT)
   SET(PLUGINS ${PLUGINS} iwinfo_plugin)
   ADD_LIBRARY(iwinfo_plugin MODULE iwinfo.c)