aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2019-07-09 18:58:13 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2019-07-09 18:58:13 +0200
commit51662952dc2b079dcbe3125983af65a0a10d5356 (patch)
tree07b43b6d0206466e5a5f083e69ed83fbf159b120
parentab0d33154340f25adb7f8a027eb7ffa928ffd0b3 (diff)
Fix crossbuild and remove lua events
Change-Id: If2b41d2ac755d2ddfa1c2b09c476359d6d4568e7
-rw-r--r--conf.d/cmake/01-debian-osconfig.cmake (renamed from conf.d/cmake/00-debian-osconfig.cmake)0
-rw-r--r--conf.d/cmake/config.cmake91
-rw-r--r--conf.d/project/etc/xds-supervisor-config.json7
-rw-r--r--conf.d/project/lua.d/CMakeLists.txt15
4 files changed, 45 insertions, 68 deletions
diff --git a/conf.d/cmake/00-debian-osconfig.cmake b/conf.d/cmake/01-debian-osconfig.cmake
index 6291a0d..6291a0d 100644
--- a/conf.d/cmake/00-debian-osconfig.cmake
+++ b/conf.d/cmake/01-debian-osconfig.cmake
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index 2d51bf3..e3b1202 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -1,5 +1,5 @@
###########################################################################
-# Copyright 2018 IoT.bzh
+# Copyright 2018-2019 IoT.bzh
#
# author: Sebastien Douheret <sebastien@iot.bzh>
#
@@ -37,16 +37,15 @@ set(PROJECT_CMAKE_CONF_DIR "conf.d")
# but used and must be built and linked.
# set(PROJECT_LIBDIR "libs")
+# Where are stored data for your application. Pictures, static resources must be placed in that folder.
+# set(PROJECT_RESOURCES "data")
+
# Which directories inspect to find CMakeLists.txt target files
# set(PROJECT_SRC_DIR_PATTERN "*")
# Compilation Mode (DEBUG, RELEASE)
# ----------------------------------
set(BUILD_TYPE "RELEASE")
-#set(USE_EFENCE 1)
-
-# Helpers Submodule parameters
-set(AFB_HELPERS_QTWSCLIENT OFF CACHE BOOL "Adds QT5 WebSocket helpers from submodule")
# Kernel selection if needed. You can choose between a
# mandatory version to impose a minimal version.
@@ -74,13 +73,16 @@ set (PKG_REQUIRED_LIST
afb-daemon>=4.0
libmicrohttpd>=0.9.55
appcontroller
- afb-helpers
+ afb-helpers
)
-# Prefix path where will be installed the files
-# Default: /usr/local (need root permission to write in)
-# ------------------------------------------------------
-set(INSTALL_PREFIX $ENV{HOME}/opt)
+# Print a helper message when every thing is finished
+# ----------------------------------------------------
+set(XDS_TOKEN "" CACHE PATH "Default binder security token")
+set(XDS_PORT "2222" CACHE PATH "Default binder listening port")
+set(CLOSING_MESSAGE "Xds binding launch: afb-daemon --port=${XDS_PORT} --name=afb-xds --workdir=${CMAKE_BINARY_DIR}/package --ldpaths=lib --roothttp=htdocs --token=\"${XDS_TOKEN}\" --ws-client=unix:/tmp/supervisor --ws-client=unix:/tmp/harvester -vv ")
+set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")
+
# Customize link option
# -----------------------------
@@ -92,57 +94,39 @@ set(INSTALL_PREFIX $ENV{HOME}/opt)
# Either separate options with ";", or each options must be quoted separately
# DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED !
# ----------------------------------------------------------------------------
-#set(COMPILE_OPTIONS
-# -Wall
-# -Wextra
-# -Wconversion
-# -Wno-unused-parameter
-# -Wno-sign-compare
-# -Wno-sign-conversion
-# -Werror=maybe-uninitialized
-# -Werror=implicit-function-declaration
-# -ffunction-sections
-# -fdata-sections
-# -fPIC
-# CACHE STRING "Compilation flags")
+#set(COMPILE_OPTIONS "-Wall" "-Wextra" "-Wconversion" "-Wno-unused-parameter" "-Wno-sign-compare" "-Wno-sign-conversion" "-Werror=maybe-uninitialized" "-Werror=implicit-function-declaration" "-ffunction-sections" "-fdata-sections" "-fPIC" CACHE STRING "Compilation flags")
#set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.")
#set(CXX_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C++ language.")
-#set(PROFILING_COMPILE_OPTIONS
-# -g
-# -O0
-# -pg
-# -Wp,-U_FORTIFY_SOURCE
-# CACHE STRING "Compilation flags for PROFILING build type.")
-#set(DEBUG_COMPILE_OPTIONS
-# -g
-# -O0
-# -ggdb
-# CACHE STRING "Compilation flags for DEBUG build type.")
-#set(COVERAGE_COMPILE_OPTIONS
-# -g
-# -O0
-# --coverage
-# CACHE STRING "Compilation flags for COVERAGE build type.")
-#set(RELEASE_COMPILE_OPTIONS
-# -g
-# -O2
-# CACHE STRING "Compilation flags for RELEASE build type.")
-
-set(CONTROL_SUPPORT_LUA 1)
+#set(PROFILING_COMPILE_OPTIONS "-g" "-O0" "-pg" "-Wp,-U_FORTIFY_SOURCE" CACHE STRING "Compilation flags for PROFILING build type.")
+#set(DEBUG_COMPILE_OPTIONS "-g" "-ggdb" "-Wp,-U_FORTIFY_SOURCE" CACHE STRING "Compilation flags for DEBUG build type.")
+#set(CCOV_COMPILE_OPTIONS "-g" "-O2" "--coverage" CACHE STRING "Compilation flags for CCOV build type.")
+#set(RELEASE_COMPILE_OPTIONS "-g" "-O2" CACHE STRING "Compilation flags for RELEASE build type.")
+
add_definitions(-DCONTROL_PLUGIN_PATH="${CMAKE_BINARY_DIR}/package/lib/plugins:${CMAKE_BINARY_DIR}/package/var:${INSTALL_PREFIX}/${PROJECT_NAME}/lib/plugins")
add_definitions(-DCONTROL_CONFIG_PATH="${CMAKE_BINARY_DIR}/package/etc:${INSTALL_PREFIX}/${PROJECT_NAME}/etc")
add_definitions(-DCTL_PLUGIN_MAGIC=1286576532)
+# SEB TODO: migration to APIV3
+#add_definitions(-DAFB_BINDING_VERSION=3)
add_definitions(-DUSE_API_DYN=1 -DAFB_BINDING_VERSION=3 -DAFB_BINDING_WANT_DYNAPI)
+# Print a helper message when every thing is finished
+# ----------------------------------------------------
+#set(CLOSING_MESSAGE "")
+#set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")
+
+# Debug for valgrind
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -ggdb")
+
# (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable]
# ---------------------------------------------------------------------
-set(CMAKE_PREFIX_PATH ${INSTALL_PREFIX}/lib64/pkgconfig ${INSTALL_PREFIX}/lib/pkgconfig)
-set(LD_LIBRARY_PATH ${INSTALL_PREFIX}/lib64 ${INSTALL_PREFIX}/lib)
+set(INSTALL_PREFIX $ENV{HOME}/opt)
+set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib)
# Optional location for config.xml.in
# -----------------------------------
-#set(WIDGET_ICON "\"conf.d/wgt/${PROJECT_ICON}\"" CACHE PATH "Path to the widget icon")
-#set(WIDGET_CONFIG_TEMPLATE "\"${CMAKE_CURRENT_SOURCE_DIR}/conf.d/wgt/config.xml.in\"" CACHE PATH "Path to widget config file template (config.xml.in)")
+set(WIDGET_ICON ${PROJECT_APP_TEMPLATES_DIR}/wgt/${PROJECT_ICON} CACHE PATH "Path to the widget icon")
+set(WIDGET_CONFIG_TEMPLATE ${CMAKE_SOURCE_DIR}/conf.d/wgt/config.xml.in CACHE PATH "Path to widget config file template (config.xml.in)")
# Mandatory widget Mimetype specification of the main unit
# --------------------------------------------------------------------------
@@ -195,13 +179,8 @@ set(WIDGET_ENTRY_POINT config.xml)
# Optional Application Framework security token
# and port use for remote debugging.
#------------------------------------------------------------
-set(AFB_TOKEN "" CACHE PATH "Default binder security token")
-set(AFB_REMPORT "2222" CACHE PATH "Default binder listening port")
-
-# Print a helper message when every thing is finished
-# ----------------------------------------------------
-set(CLOSING_MESSAGE "Typical binding launch: afb-daemon --port=${AFB_REMPORT} --name=afb-xds --workdir=${CMAKE_BINARY_DIR}/package --ldpaths=lib --roothttp=htdocs --token=\"${AFB_TOKEN}\" --ws-client=unix:/tmp/supervisor --ws-client=unix:/tmp/harvester -vv ")
-set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")
+#set(AFB_TOKEN "" CACHE PATH "Default AFB_TOKEN")
+#set(AFB_REMPORT "1234" CACHE PATH "Default AFB_TOKEN")
# Optional schema validator about now only XML, LUA and JSON
# are supported
diff --git a/conf.d/project/etc/xds-supervisor-config.json b/conf.d/project/etc/xds-supervisor-config.json
index a763818..15304f4 100644
--- a/conf.d/project/etc/xds-supervisor-config.json
+++ b/conf.d/project/etc/xds-supervisor-config.json
@@ -35,13 +35,10 @@
}
],
- "events": [{
+ "events": [
+ {
"uid": "supervisor/xds-trace",
"action": "plugin://supervisor#tracing_events"
- },
- {
- "uid": "_DISABLE_supervisor/xds-trace",
- "action": "lua://supervisor#_trace_events_"
}
]
diff --git a/conf.d/project/lua.d/CMakeLists.txt b/conf.d/project/lua.d/CMakeLists.txt
index 1e64cf2..aade4cb 100644
--- a/conf.d/project/lua.d/CMakeLists.txt
+++ b/conf.d/project/lua.d/CMakeLists.txt
@@ -20,13 +20,14 @@
##################################################
# XDS Lua Scripts
##################################################
-PROJECT_TARGET_ADD(xds-lua)
- file(GLOB LUA_FILES "*.lua")
+# PROJECT_TARGET_ADD(xds-lua)
- add_input_files("${LUA_FILES}")
+# file(GLOB LUA_FILES "*.lua")
- SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
- LABELS "DATA"
- OUTPUT_NAME ${TARGET_NAME}
- )
+# add_input_files("${LUA_FILES}")
+
+# SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+# LABELS "DATA"
+# OUTPUT_NAME ${TARGET_NAME}
+# )