message: move bit position flag and action
[apps/agl-service-can-low-level.git] / conf.d / cmake / config.cmake
index f657367..cedb5e3 100644 (file)
@@ -38,7 +38,7 @@ set(PROJECT_CMAKE_CONF_DIR "conf.d")
 
 # Compilation Mode (DEBUG, RELEASE)
 # ----------------------------------
-set(BUILD_TYPE "RELEASE" CACHE STRING "Default Build variant chosen. (Overwritten by cli if given)")
+set(BUILD_TYPE "DEBUG" CACHE STRING "Default Build variant chosen. (Overwritten by cli if given)")
 
 # Activate J1939
 # Need module in kernel
@@ -58,6 +58,23 @@ else()
        add_definitions(-DJ1939_NAME_ECU=${J1939_NAME_ECU})
 endif()
 
+# Activate ISO TP
+# Need module in kernel
+# --------------
+
+execute_process(COMMAND ls /usr/include/linux/can/isotp.h RESULT_VARIABLE result2 OUTPUT_QUIET ERROR_QUIET)
+
+if(result2)
+    message("Feature ISO TP disabled")
+    set(WITH_FEATURE_ISOTP OFF)
+else()
+    message("Feature ISOTP enabled")
+    set(WITH_FEATURE_ISOTP ON)
+    add_definitions(-DUSE_FEATURE_ISOTP)
+endif()
+
+
+
 # Kernel selection if needed. You can choose between a
 # mandatory version to impose a minimal version.
 # Or check Kernel minimal version and just print a Warning
@@ -83,6 +100,7 @@ set (PKG_REQUIRED_LIST
        libsystemd>=222
        afb-daemon
        afb-helpers
+       appcontroller
 )
 
 # Prefix path where will be installed the files
@@ -94,6 +112,8 @@ set(INSTALL_PREFIX $ENV{HOME}/opt)
 # -----------------------------
 list (APPEND link_libraries -pthread)
 
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+
 # Compilation options definition
 # Use CMake generator expressions to specify only for a specific language
 # Values are prefilled with default options that is currently used.
@@ -108,7 +128,6 @@ set(COMPILE_OPTIONS
  -Wno-sign-compare
  -Wno-sign-conversion
  -Werror=maybe-uninitialized
- -Werror=implicit-function-declaration
  -ffunction-sections
  -fdata-sections
  -fPIC
@@ -167,7 +186,7 @@ set(WIDGET_TYPE application/vnd.agl.service)
 # This is the file that will be executed, loaded,
 # at launch time by the application framework.
 #
-set(WIDGET_ENTRY_POINT lib/afb-low-can.so)
+set(WIDGET_ENTRY_POINT lib/afb-low-can-binding.so)
 
 # Optional dependencies order
 # ---------------------------
@@ -200,6 +219,13 @@ set(AFB_REMPORT "1234" CACHE STRING "Default binder listening port")
 set(CLOSING_MESSAGE "Typical binding launch: afb-daemon --port=${AFB_REMPORT} --workdir=${CMAKE_BINARY_DIR}/package --ldpaths=lib --roothttp=htdocs  --token=\"${AFB_TOKEN}\" --tracereq=common --verbose")
 set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")
 
+
+# Add Controller config
+add_definitions(-DCONTROL_PLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/lib/plugins:${CMAKE_BINARY_DIR}/package/lib/plugins:${CMAKE_BINARY_DIR}/package/var:${CMAKE_BINARY_DIR}/package-test")
+add_definitions(-DCONTROL_CONFIG_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/etc:${CMAKE_BINARY_DIR}/package/etc:${CMAKE_BINARY_DIR}/package-test/")
+
+
+
 # Optional schema validator about now only XML, LUA and JSON
 # are supported
 #------------------------------------------------------------