X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=conf.d%2Fcmake%2Fconfig.cmake;h=30d2b46734bec47cf7707049e727c197c6ce872f;hb=refs%2Fchanges%2F80%2F23280%2F1;hp=550409a97aedfd0a975025e3056c077b823bd127;hpb=d43fa62bda4912580c1b790bdc4172e862aba975;p=apps%2Fagl-service-can-low-level.git diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index 550409a9..30d2b467 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -40,6 +40,41 @@ set(PROJECT_CMAKE_CONF_DIR "conf.d") # ---------------------------------- 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() + +# 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 @@ -64,6 +99,7 @@ set (PKG_REQUIRED_LIST json-c libsystemd>=222 afb-daemon + afb-helpers ) # Prefix path where will be installed the files