X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=conf.d%2Fcmake%2Fconfig.cmake;h=3453d6602eb05b11420d9ee8335d4090d7c4ece2;hb=7c588f697c55b14fbbb0d6245d4f02f4a99412b3;hp=f6573671c70c3a6f67ffb059065bdf1031519572;hpb=22e1fe8db6686ee6ae32cfe58a10aad9f7dfb3a7;p=apps%2Fagl-service-can-low-level.git diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index f6573671..3453d660 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -38,13 +38,13 @@ 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 # -------------- -execute_process(COMMAND ls /usr/include/linux/can/j1939.h RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) +execute_process(COMMAND ls $ENV{PKG_CONFIG_SYSROOT_DIR}/usr/include/linux/can/j1939.h RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET) if(result) message("Feature J1939 disabled") @@ -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 $ENV{PKG_CONFIG_SYSROOT_DIR}/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 #------------------------------------------------------------