diff options
author | Alexander Mohr <alexander.m.mohr@daimler.com> | 2022-01-24 14:29:55 +0100 |
---|---|---|
committer | Alexander Mohr <alexander.m.mohr@mercedes-benz.com> | 2022-05-09 13:36:10 +0200 |
commit | fcb676a79de5054803d701362a66962d04902179 (patch) | |
tree | 9ddfa7fca62932412f40b9bb18a22a509e3f9cab /src/adaptor | |
parent | 0138c00811c86eab4ff6bff3c6528163885ade19 (diff) | |
download | DLT-daemon-fcb676a79de5054803d701362a66962d04902179.tar.gz |
Issue-ID: make-adaptor-configurablecmake: Add option to enable each adaptor by itself
This commit adds two options to enable the udp and stdin
adaptor indendent from each other.
Therefore only the necessary component can be enabled
Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
Diffstat (limited to 'src/adaptor')
-rw-r--r-- | src/adaptor/CMakeLists.txt | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/adaptor/CMakeLists.txt b/src/adaptor/CMakeLists.txt index 93d6ec5..aa9b9d1 100644 --- a/src/adaptor/CMakeLists.txt +++ b/src/adaptor/CMakeLists.txt @@ -13,18 +13,24 @@ # For further information see http://www.genivi.org/. ####### -set(dlt_adaptor_stdin_SRCS dlt-adaptor-stdin.c) -add_executable(dlt-adaptor-stdin ${dlt_adaptor_stdin_SRCS}) -target_link_libraries(dlt-adaptor-stdin dlt) -set_target_properties(dlt-adaptor-stdin PROPERTIES LINKER_LANGUAGE C) +if (WITH_DLT_ADAPTOR_STDIN OR WITH_DLT_ADAPTOR) + set(dlt_adaptor_stdin_SRCS dlt-adaptor-stdin.c) + add_executable(dlt-adaptor-stdin ${dlt_adaptor_stdin_SRCS}) + target_link_libraries(dlt-adaptor-stdin dlt) + set_target_properties(dlt-adaptor-stdin PROPERTIES LINKER_LANGUAGE C) -set(dlt_adaptor_udp_SRCS dlt-adaptor-udp.c) -add_executable(dlt-adaptor-udp ${dlt_adaptor_udp_SRCS}) -target_link_libraries(dlt-adaptor-udp dlt) -set_target_properties(dlt-adaptor-udp PROPERTIES LINKER_LANGUAGE C) - -install(TARGETS dlt-adaptor-stdin dlt-adaptor-udp - RUNTIME DESTINATION bin - COMPONENT base) + install(TARGETS dlt-adaptor-stdin + RUNTIME DESTINATION bin + COMPONENT base) +endif() +if (WITH_DLT_ADAPTOR_UDP OR WITH_DLT_ADAPTOR) + set(dlt_adaptor_udp_SRCS dlt-adaptor-udp.c) + add_executable(dlt-adaptor-udp ${dlt_adaptor_udp_SRCS}) + target_link_libraries(dlt-adaptor-udp dlt) + set_target_properties(dlt-adaptor-udp PROPERTIES LINKER_LANGUAGE C) + install(TARGETS dlt-adaptor-stdin + RUNTIME DESTINATION bin + COMPONENT base) +endif() |