summaryrefslogtreecommitdiff
path: root/src/console/CMakeLists.txt
diff options
context:
space:
mode:
authorBiastoch, Darian (ADITG/ESM) <dbiastoch@de.adit-jv.com>2021-04-08 06:36:18 +0000
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-06-30 10:54:59 +0900
commit57d981f9d765286a85e682f7bee0769d7349e7aa (patch)
tree3fbfef66707cff032da293b1e7ef249131845032 /src/console/CMakeLists.txt
parent72dc5bb1fa7bd0823ef17269ab6e5c7dd76f90fd (diff)
downloadDLT-daemon-57d981f9d765286a85e682f7bee0769d7349e7aa.tar.gz
Alternative solutions for json-c dependency
json-c dependency was removed from libdlt ('dlt_common') and shifted into 'dlt-control-common'. By this only the command line tools have a dependency on json-c. dlt-control-common is now built as a static library, so that it can be linked against json-c. Command line tools that included only the .c file of dlt-control-common before, are now linked against this static libarary (see console/CMakeLists.txt). Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
Diffstat (limited to 'src/console/CMakeLists.txt')
-rw-r--r--src/console/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/console/CMakeLists.txt b/src/console/CMakeLists.txt
index 986a0d4..b2b731a 100644
--- a/src/console/CMakeLists.txt
+++ b/src/console/CMakeLists.txt
@@ -14,6 +14,9 @@
#######
set(dlt_control_common_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/dlt-control-common.c)
+add_library(dlt_control_common_lib STATIC ${dlt_control_common_SRCS})
+target_link_libraries(dlt_control_common_lib dlt ${DLT_JSON_LIBRARY})
+
add_subdirectory(logstorage)
set(dlt-sortbytimestamp_SRCS dlt-sortbytimestamp.c)
@@ -30,7 +33,7 @@ foreach(target
dlt-passive-node-ctrl
)
add_executable(${target} ${${target}_SRCS})
- target_link_libraries(${target} dlt)
+ target_link_libraries(${target} dlt dlt_control_common_lib)
set_target_properties(${target} PROPERTIES LINKER_LANGUAGE C)
install(TARGETS ${target}