# ----------------------------------
set(BUILD_TYPE "RELEASE" CACHE STRING "Default Build variant chosen. (Overwritten by cli if given)")
+# Activate J1939
+# Need module in kernel
+# --------------
+
+execute_process(COMMAND ls /usr/include/linux/can/j1939.h RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
+
+if(result)
+ message("Feature J1939 disabled")
+ set(WITH_FEATURE_J1939 OFF)
+else()
+ message("Feature J1939 enabled")
+ set(WITH_FEATURE_J1939 ON)
+ add_definitions(-DUSE_FEATURE_J1939)
+ # Define name for ECU
+ set(J1939_NAME_ECU 0x1239)
+ add_definitions(-DJ1939_NAME_ECU=${J1939_NAME_ECU})
+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
json-c
libsystemd>=222
afb-daemon
+ afb-helpers
)
# Prefix path where will be installed the files