summaryrefslogtreecommitdiffstats
path: root/Controler-afb/CMakeLists.txt
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-16 18:25:05 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-16 18:25:05 +0200
commit61f0f263c335ad403c6693a1b8b6f5428ac180a8 (patch)
tree80b49b996a1a67f164643d6fdac5645801cc6fe5 /Controler-afb/CMakeLists.txt
parent4ca8fd4015479fa758a789d137a693c30fec8cae (diff)
Fixed LUA Nested Table Issues. Added LUA2C for User Defined Plugins
Diffstat (limited to 'Controler-afb/CMakeLists.txt')
-rw-r--r--Controler-afb/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/Controler-afb/CMakeLists.txt b/Controler-afb/CMakeLists.txt
index 78e66c8..30fcb37 100644
--- a/Controler-afb/CMakeLists.txt
+++ b/Controler-afb/CMakeLists.txt
@@ -26,14 +26,19 @@ macro(SET_TARGET_GENSKEL TARGET_NAME API_DEF_NAME)
)
add_custom_target(${API_DEF_NAME}_OPENAPI DEPENDS ${API_DEF_NAME}.h)
add_dependencies(${TARGET_NAME} ${API_DEF_NAME}_OPENAPI)
-
endmacro(SET_TARGET_GENSKEL)
+# Include LUA only when requested
+if(CONTROL_SUPPORT_LUA)
+ message(STATUS "Notice: LUA Controler Support Selected")
+ set(CTL_LUA_SOURCE ctl-lua.c)
+endif(CONTROL_SUPPORT_LUA)
+
# Add target to project dependency list
PROJECT_TARGET_ADD(control-afb)
# Define project Targets
- ADD_LIBRARY(${TARGET_NAME} MODULE ctl-binding.c ctl-events.c ctl-dispatch.c ctl-lua.c)
+ ADD_LIBRARY(${TARGET_NAME} MODULE ctl-binding.c ctl-events.c ctl-dispatch.c ${CTL_LUA_SOURCE})
# Generate API-v2 hat from OpenAPI json definition
SET_TARGET_GENSKEL(${TARGET_NAME} ctl-apidef)