summaryrefslogtreecommitdiffstats
path: root/low-can-binding/CMakeLists.txt
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-06-26 09:14:42 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2019-06-26 17:55:05 +0200
commit82b45e3de8c92816c8080178224c5bd4be60a091 (patch)
tree13da4bf66579ae174ecdb2f3f85f8bd248a927ef /low-can-binding/CMakeLists.txt
parent9f0d5da859bfe7778394f35baf48fbe77f1ed7d9 (diff)
Add CMake option to compile with J1939
Add option USE_FEATURE_J1939 to compile j1939 in file config.cmake This will be set up by default depending on the presence on the building host of the J1939 CAN module headers. Bug-AGL: SPEC-2386 Change-Id: I54d4594ff01d4e509bfa0862f3cb486562024aed Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/CMakeLists.txt')
-rw-r--r--low-can-binding/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/low-can-binding/CMakeLists.txt b/low-can-binding/CMakeLists.txt
index d09757d6..296fa7d4 100644
--- a/low-can-binding/CMakeLists.txt
+++ b/low-can-binding/CMakeLists.txt
@@ -18,10 +18,11 @@
###########################################################################
# Add target to project dependency list
+
PROJECT_TARGET_ADD(low-can)
# Define project Targets
- add_library(${TARGET_NAME} MODULE
+ set (SOURCES
#binding/${TARGET_NAME}-hat.cpp
binding/${TARGET_NAME}-cb.cpp
binding/${TARGET_NAME}-subscription.cpp
@@ -45,6 +46,14 @@ PROJECT_TARGET_ADD(low-can)
utils/config-parser.cpp
binding/application-generated.cpp)
+ if(WITH_FEATURE_J1939)
+ set(SOURCES_J1939
+ # Empty for the moment to not break the build until all modifications are set
+ )
+ endif()
+
+ add_library(${TARGET_NAME} MODULE ${SOURCES} ${SOURCES_J1939})
+
set(OPENAPI_DEF "binding/low-can-apidef" CACHE STRING "name and path to the JSON API definition without extension")
# Binder exposes a unique public entry point
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES