From ad996e0f7959a9b89e48f68fef253df0fd86fdbc Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Mon, 11 Dec 2023 15:59:51 -0500 Subject: [PATCH] =?UTF-8?q?General=20CMakeLists=20improvements=20-=20cmake?= =?UTF-8?q?=20v2=E2=86=92v3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use targets instead of lib/include variables in CMake - Write internal.hpp to build directory instead of source to prevent needless rebuilds - Remove hard coded CMAKE_VERBOSE_MAKEFILE - Update DLT linkage - Ran cmake-format - "wrap"ing (ld's --wrap option) the "socket" symbol, see wrappers.cpp - Added install directive to vsomeip/example/hello_world and vsomeip_ctrl - Platform conditional socket lib linkage - hello_world code uses ENABLE_SIGNALS, but its setting was missing in CMake - Improve setup for boost stacktrace, really only helps on Linux and requires the backtrace.h file - Added QNX platform section, though the credential code changes for QNX are not included in this commit. - Use a CACHE variable for VSOMEIP_BASE_PATH. Upstream defaults this to /var for QNX which is a very bad choice. --- CMakeLists.txt | 494 +++++++++++++----------- examples/CMakeLists.txt | 58 ++- examples/hello_world/CMakeLists.txt | 48 ++- examples/routingmanagerd/CMakeLists.txt | 31 +- test/benchmark_tests/CMakeLists.txt | 48 ++- tools/CMakeLists.txt | 14 +- 6 files changed, 390 insertions(+), 303 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dde508ed..b715695e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain # one at http://mozilla.org/MPL/2.0/. -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.15) project(vsomeip) set(VSOMEIP_NAME vsomeip3) @@ -15,7 +15,6 @@ set(VSOMEIP_HOTFIX_VERSION 0) set(VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION}) set(PACKAGE_VERSION ${VSOMEIP_VERSION}) # Used in documentation/doxygen.in -set(CMAKE_VERBOSE_MAKEFILE off) if(NOT GTEST_ROOT) if(DEFINED ENV{GTEST_ROOT}) @@ -36,17 +35,19 @@ endif() # see http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file # ###################################################################################################################### +include(GNUInstallDirs) + # Offer the user the choice of overriding the installation directories set(INSTALL_LIB_DIR - lib + ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries" ) set(INSTALL_BIN_DIR - bin + ${CMAKE_INSTALL_BINDIR} CACHE PATH "Installation directory for executables" ) set(INSTALL_INCLUDE_DIR - include + ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Installation directory for header files" ) @@ -62,21 +63,16 @@ set(INSTALL_CMAKE_DIR ) # Make relative paths absolute (needed later on) -foreach( - p - LIB - BIN - INCLUDE - CMAKE -) +foreach(p LIB BIN INCLUDE CMAKE) set(var INSTALL_${p}_DIR) if(NOT IS_ABSOLUTE "${${var}}") set(ABSOLUTE_${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") # Add all targets to the build-tree export set endif() endforeach() -# ###################################################################################################################### +# ##################################################################### # Set a default build type if none was specified +# This is a CMake anti-pattern. set(default_build_type "RelWithDebInfo") if(NOT CMAKE_BUILD_TYPE) message(STATUS "Setting build type to '${default_build_type}' as none was specified.") @@ -97,92 +93,165 @@ endif() set(CMAKE_CXX_STANDARD 17) +# Threads +find_package(Threads REQUIRED) + # OS +add_library(OS_INTERFACE INTERFACE IMPORTED) +add_library(RT_INTERFACE INTERFACE IMPORTED) +add_library(DL_INTERFACE INTERFACE IMPORTED) +add_library(STACKTRACE_INTERFACE INTERFACE IMPORTED) + +# Boost +find_package( + Boost 1.65 REQUIRED + COMPONENTS system thread filesystem + OPTIONAL_COMPONENTS stacktrace_basic stacktrace_backtrace stacktrace_addr2line +) + +include(CMakeDependentOption) +cmake_dependent_option(ENABLE_WERROR "Enable -Werror flag" ON "CMAKE_SYSTEM_NAME MATCHES LINUX" OFF) +if (ENABLE_WERROR) + message(STATUS "Enabling -Werror flag") + add_compile_options(-Werror) +endif() + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(DL_LIBRARY "dl") + set(OS "LINUX") + target_link_libraries(DL_INTERFACE INTERFACE dl) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + add_definitions(-D_GLIBCXX_USE_NANOSLEEP -D_FORTIFY_SOURCE=2) + add_compile_options( + -Wall + -Wextra + -Wformat + -Wformat-security + -Wconversion + -Wformat + -Werror=format-security + -Wpedantic + -fexceptions + -fstrict-aliasing + -fstack-protector-strong + -fasynchronous-unwind-tables + -fno-omit-frame-pointer + ) + + target_link_libraries(OS_INTERFACE INTERFACE Threads::Threads) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # This is only relevant for GCC and causes warnings on Clang - set(EXPORTSYMBOLS "-Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc") - set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -pie -Wno-tsan -Wl,-z,relro,-z,now") + add_link_options( + -Wl,-z,relro,-z,now -Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc + ) endif() - - set(NO_DEPRECATED "") - set(OPTIMIZE "") - set(OS_CXX_FLAGS - "${OS_CXX_FLAGS} -D_GLIBCXX_USE_NANOSLEEP -pthread -O -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector-strong -fasynchronous-unwind-tables -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wpedantic -Werror -fPIE" - ) + add_link_options(-Wl,--wrap=socket,--wrap=accept,--wrap=open) # force all use of std::mutex and std::recursive_mutex to use runtime init instead of static initialization so mutexes # can be hooked to enable PI as needed add_definitions(-D_GTHREAD_USE_MUTEX_INIT_FUNC -D_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC) -endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") -if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - set(DL_LIBRARY "") - set(EXPORTSYMBOLS "") - set(NO_DEPRECATED "-Wno-deprecated") - set(OPTIMIZE "") - set(OS_CXX_FLAGS "-pthread") -endif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + # For backtraces to work, define the following in your toolchain: + # -DBOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE="/usr/lib/gcc/x86_64-linux-gnu/11/include/backtrace.h" (this is hardcoded + # here as it does not necessarily represent yours system) + target_compile_definitions( + STACKTRACE_INTERFACE INTERFACE -DBOOST_STACKTRACE_USE_BACKTRACE -DBOOST_STACKTRACE_USE_ADDR2LINE + ) + target_link_libraries( + STACKTRACE_INTERFACE INTERFACE Boost::stacktrace_addr2line Boost::stacktrace_backtrace backtrace + ) + +elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + set(OS "FREEBSD") + add_compile_options(-Wno-deprecated) + target_link_libraries(OS_INTERFACE INTERFACE Threads::Threads) + +elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX") + set(OS "QNX") + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + add_compile_options( + -fexceptions + -fstrict-aliasing + -fstack-protector + -fasynchronous-unwind-tables + -fno-omit-frame-pointer + ) + add_link_options(-Wl,-export-dynamic) + add_link_options(-Wl,--wrap=socket,--wrap=accept,--wrap=open) + + target_link_libraries(OS_INTERFACE INTERFACE slog2) + + # QNX specific socket lib + set(VSOMEIP_SOCKET_LIB "socket" CACHE "Default socket library for QNX" STRING) + target_link_libraries(RT_INTERFACE INTERFACE $<$:${VSOMEIP_SOCKET_LIB}>) -# ###########################################My lib link flags#################################### + # Boost::stacktrace_addr2line is not available on QNX libbacktrace.so is not installed on target by default + target_link_libraries( + STACKTRACE_INTERFACE INTERFACE Boost::stacktrace_basic + ) +endif() + +if(${OS}) + add_definitions(-D${OS}) +endif() + +# ###################################My lib link flags############################## # Options -# ###################################################################################################################### +# ################################################################################## # DLT -if(DISABLE_DLT) - set(VSOMEIP_ENABLE_DLT 0) +set(USE_DLT + FALSE + CACHE BOOL "Use dlt-daemon (automotive-dlt) runtime" +) +if(USE_DLT) + find_package(automotive-dlt) + if(automotive-dlt_FOUND) + message(STATUS "automotive-dlt found and will be linked") + endif() else() - set(VSOMEIP_ENABLE_DLT 1) + message(STATUS "Not linking automotive-dlt") endif() # Signal handling +option(ENABLE_SIGNAL_HANDLING "Enable signal handling (SIGTERM, SIGINT, etc)" OFF) if(ENABLE_SIGNAL_HANDLING) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVSOMEIP_ENABLE_SIGNAL_HANDLING") + add_definitions(-DVSOMEIP_ENABLE_SIGNAL_HANDLING) endif() +# Sanitizers if(NOT MSVC) - # Sanitizers - if(ENABLE_UNDEFINED_SANITIZER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") + add_compile_options(-fsanitize=undefined) endif() if(ENABLE_THREAD_SANITIZER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread") + add_compile_options(-fsanitize=thread) endif() if(ENABLE_LEAK_SANITIZER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=leak") + add_compile_options(-fsanitize=leak) endif() if(ENABLE_ADDRESS_SANITIZER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") + add_compile_options(-fsanitize=address) endif() if(ENABLE_PROFILING) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") + add_compile_options(-pg) endif() -endif(NOT MSVC) +endif() # Compatibility -if(ENABLE_COMPAT) - set(VSOMEIP_ENABLE_COMPAT 1) -else() - set(VSOMEIP_ENABLE_COMPAT 0) -endif() +option(VSOMEIP_ENABLE_COMPAT "Enable compatibility layer" OFF) # Multiple routing managers -if(ENABLE_MULTIPLE_ROUTING_MANAGERS) - set(VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS 1) -else() - set(VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS 0) -endif() +option(ENABLE_MULTIPLE_ROUTING_MANAGERS "Enable multiple routing managers" OFF) # Security / Policy handling +option(DISABLE_SECURITY "Disable security features") if(DISABLE_SECURITY) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVSOMEIP_DISABLE_SECURITY") + add_definitions(-DVSOMEIP_DISABLE_SECURITY) endif() # Suppress deprecation warnings for vSomeIP interfaces @@ -195,31 +264,8 @@ add_definitions(-DVSOMEIP_INTERNAL_SUPPRESS_DEPRECATED) # Threads find_package(Threads REQUIRED) -# Boost -find_package( - Boost 1.55 - COMPONENTS system thread filesystem - REQUIRED -) -if(${CMAKE_SYSTEM_NAME} MATCHES "QNX") - include_directories(${Boost_INCLUDE_DIR}) -else() - include_directories(SYSTEM ${Boost_INCLUDE_DIR}) -endif() - -if(Boost_FOUND) - if(Boost_LIBRARY_DIR) - message(STATUS "Boost_LIBRARY_DIR not empty using it: ${Boost_LIBRARY_DIR}") - else() - if(BOOST_LIBRARYDIR) - message( - STATUS "Boost_LIBRARY_DIR empty but BOOST_LIBRARYDIR is set setting Boost_LIBRARY_DIR to: ${BOOST_LIBRARYDIR}" - ) - set(Boost_LIBRARY_DIR ${BOOST_LIBRARYDIR}) - endif() - endif() -else() - message(STATUS "Boost was not found!") +if(NOT Boost_FOUND) + message(FATAL_ERROR "Boost was not found!") endif() # cmake 3.15 introduced a new variable and a new format for the old one @@ -231,45 +277,29 @@ endif() message(STATUS "Using boost version: ${VSOMEIP_BOOST_VERSION}") -if(${VSOMEIP_BOOST_VERSION} LESS 106600) - include_directories(SYSTEM implementation/helper) -endif() - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVSOMEIP_BOOST_VERSION=${VSOMEIP_BOOST_VERSION}") +add_definitions(-DVSOMEIP_BOOST_VERSION=${VSOMEIP_BOOST_VERSION}) find_package(PkgConfig) -# DLT -if(VSOMEIP_ENABLE_DLT EQUAL 1) - pkg_check_modules(DLT "automotive-dlt >= 2.11") - if(DLT_FOUND) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_DLT") - endif(DLT_FOUND) -endif() - # SystemD pkg_check_modules(SystemD "libsystemd") -if(NOT SystemD_FOUND) +if(NOT SystemD_FOUND OR ${CMAKE_SYSTEM_NAME} MATCHES "Android") message(STATUS "Systemd was not found, watchdog disabled!") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITHOUT_SYSTEMD") -endif(NOT SystemD_FOUND) + add_definitions(-DWITHOUT_SYSTEMD) +else() + target_link_libraries(OS_INTERFACE INTERFACE ${SystemD_LIBRARIES}) +endif() # Multiple routing managers -if(VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 1) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS") +if(ENABLE_MULTIPLE_ROUTING_MANAGERS) + add_definitions(-DVSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS) endif() # ###################################################################################################################### # Directories # ###################################################################################################################### -include_directories(interface) - -include_directories(SYSTEM ${DLT_INCLUDE_DIRS}) - -link_directories(${DLT_LIBDIR}) - if(${VSOMEIP_HOTFIX_VERSION} EQUAL 0) add_definitions(-DVSOMEIP_VERSION="${VSOMEIP_VERSION}") else() @@ -287,41 +317,42 @@ if(MSVC) ) # Disable warning C4250 since it warns that the compiler is correctly following the C++ Standard. It's a # "We-Are-Doing-Things-By-The-Book" notice, not a real warning. - set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DBOOST_ASIO_DISABLE_IOCP /EHsc /std:c++14 /wd4250" + add_compile_options(/EHsc /std:c++latest /wd4250) + add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_SCL_SECURE_NO_WARNINGS + -D_WINSOCK_DEPRECATED_NO_WARNINGS + -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} + -DWIN32 + -DBOOST_ASIO_DISABLE_IOCP ) - set(USE_RT "") link_directories(${Boost_LIBRARY_DIR_DEBUG}) -elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX") - set(USE_RT "") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OS_CXX_FLAGS} -g ${OPTIMIZE} -std=c++17 ${NO_DEPRECATED} ${EXPORTSYMBOLS}") - set(USE_RT "rt") + target_link_libraries(RT_INTERFACE INTERFACE rt) endif() # ###################################################################################################################### # Configuration library # ###################################################################################################################### -file(GLOB ${VSOMEIP_NAME}-cfg_SRC "implementation/configuration/src/*.cpp") -list(SORT ${VSOMEIP_NAME}-cfg_SRC) -if(VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 0) - add_library(${VSOMEIP_NAME}-cfg SHARED ${${VSOMEIP_NAME}-cfg_SRC}) +file(GLOB vsomeip3_cfg_SRC "implementation/configuration/src/*.cpp") +list(SORT vsomeip3_cfg_SRC) +if(NOT ENABLE_MULTIPLE_ROUTING_MANAGERS) + add_library(vsomeip3-cfg SHARED) + target_sources(vsomeip3-cfg PRIVATE ${vsomeip3_cfg_SRC}) set_target_properties( - ${VSOMEIP_NAME}-cfg PROPERTIES + vsomeip3-cfg PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION} + EXPORT_NAME vsomeip3-cfg ) - if(MSVC) - set_target_properties(${VSOMEIP_NAME}-cfg PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") - endif() + target_compile_definitions(vsomeip3-cfg PUBLIC $<$:VSOMEIP_DLL_COMPILATION_PLUGIN>) target_link_libraries( - ${VSOMEIP_NAME}-cfg - ${VSOMEIP_NAME} - ${Boost_LIBRARIES} - ${USE_RT} - ${DL_LIBRARY} - ${SystemD_LIBRARIES} + vsomeip3-cfg + PRIVATE vsomeip3 + RT_INTERFACE + DL_INTERFACE + OS_INTERFACE ) endif() @@ -330,7 +361,7 @@ endif() # ###################################################################################################################### file( GLOB - ${VSOMEIP_NAME}_SRC + vsomeip3_SRC "implementation/endpoints/src/*.cpp" "implementation/logger/src/*.cpp" "implementation/tracing/src/*.cpp" @@ -342,9 +373,10 @@ file( "implementation/security/src/*.cpp" "implementation/utility/src/*.cpp" ) -if(VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 1) - list(APPEND ${VSOMEIP_NAME}_SRC "implementation/configuration/src/configuration_impl.cpp") +if(ENABLE_MULTIPLE_ROUTING_MANAGERS) + list(APPEND vsomeip3_SRC "implementation/configuration/src/configuration_impl.cpp") endif() +list(SORT vsomeip3_SRC) if(WIN32) list( @@ -355,39 +387,44 @@ if(WIN32) ) endif() -list(SORT ${VSOMEIP_NAME}_SRC) - -add_library(${VSOMEIP_NAME} SHARED ${${VSOMEIP_NAME}_SRC}) -set_target_properties( - ${VSOMEIP_NAME} PROPERTIES - VERSION ${VSOMEIP_VERSION} - SOVERSION ${VSOMEIP_MAJOR_VERSION} +add_library(vsomeip3 SHARED) +target_sources(vsomeip3 PRIVATE ${vsomeip3_SRC}) +target_include_directories( + vsomeip3 + PUBLIC $ + $ + INTERFACE $ ) -if(MSVC) - set_target_properties(${VSOMEIP_NAME} PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION") -else() - set_target_properties( - ${VSOMEIP_NAME} - PROPERTIES - LINK_FLAGS - "-Wl,-wrap,socket -Wl,-wrap,accept -Wl,-wrap,open" +if(${VSOMEIP_BOOST_VERSION} LESS 106600) + target_include_directories( + vsomeip3 SYSTEM + PUBLIC # The vsomeip boost helpers are a SYSTEM include to suppress warnings. These warnings should likely be + # addressed though + $ ) endif() -target_include_directories( - ${VSOMEIP_NAME} INTERFACE $ $ - $ +target_compile_definitions(vsomeip3 PUBLIC _GNU_SOURCE $<$:VSOMEIP_DLL_COMPILATION>) +target_include_directories(vsomeip3 SYSTEM PUBLIC $) +target_link_libraries(vsomeip3 PRIVATE STACKTRACE_INTERFACE) +set_target_properties( + vsomeip3 PROPERTIES + SOVERSION ${VSOMEIP_MAJOR_VERSION} + VERSION ${VSOMEIP_VERSION} + OUTPUT_NAME ${VSOMEIP_NAME} + EXPORT_NAME vsomeip3 ) + # PRIVATE means the listed libraries won't be included in the "link interface", meaning the exported # ${VSOMEIP_NAME}Targets.cmake targets won't try to link against them (which shouldn't be required). ${Boost_LIBRARIES} # includes absolute build host paths as of writing, which also makes this important as it breaks the build. target_link_libraries( - ${VSOMEIP_NAME} - PRIVATE ${Boost_LIBRARIES} - ${USE_RT} - ${DL_LIBRARY} - ${DLT_LIBRARIES} - ${SystemD_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} + vsomeip3 + PRIVATE Boost::filesystem + Boost::thread + RT_INTERFACE + DL_INTERFACE + OS_INTERFACE + Threads::Threads ) if(NOT WIN32) @@ -397,98 +434,89 @@ endif() # ###################################################################################################################### # Service Discovery library # ###################################################################################################################### -file(GLOB ${VSOMEIP_NAME}-sd_SRC "implementation/service_discovery/src/*.cpp") -list(SORT ${VSOMEIP_NAME}-sd_SRC) +file(GLOB vsomeip3_sd_SRC "implementation/service_discovery/src/*.cpp") +list(SORT vsomeip3_sd_SRC) -add_library(${VSOMEIP_NAME}-sd SHARED ${${VSOMEIP_NAME}-sd_SRC}) +add_library(vsomeip3-sd SHARED) +target_sources(vsomeip3-sd PRIVATE ${vsomeip3_sd_SRC}) set_target_properties( - ${VSOMEIP_NAME}-sd PROPERTIES + vsomeip3-sd PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION} ) -if(MSVC) - set_target_properties(${VSOMEIP_NAME}-sd PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") -endif() - +target_compile_definitions(vsomeip3-sd PUBLIC $<$:VSOMEIP_DLL_COMPILATION_PLUGIN>) target_link_libraries( - ${VSOMEIP_NAME}-sd - ${VSOMEIP_NAME} - ${Boost_LIBRARIES} - ${USE_RT} - ${DL_LIBRARY} - ${SystemD_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} + vsomeip3-sd + PUBLIC vsomeip3 + PRIVATE RT_INTERFACE + DL_INTERFACE + OS_INTERFACE + Threads::Threads ) # ###################################################################################################################### # E2E library # ###################################################################################################################### -file(GLOB_RECURSE ${VSOMEIP_NAME}-e2e_SRC "implementation/e2e_protection/src/*.cpp") -list(SORT ${VSOMEIP_NAME}-e2e_SRC) +file(GLOB_RECURSE vsomeip3_e2e_SRC "implementation/e2e_protection/src/*.cpp") +list(SORT vsomeip3_e2e_SRC) -add_library(${VSOMEIP_NAME}-e2e SHARED ${${VSOMEIP_NAME}-e2e_SRC}) +add_library(vsomeip3-e2e SHARED) +target_sources(vsomeip3-e2e PRIVATE ${vsomeip3_e2e_SRC}) set_target_properties( - ${VSOMEIP_NAME}-e2e PROPERTIES + vsomeip3-e2e PROPERTIES VERSION ${VSOMEIP_VERSION} SOVERSION ${VSOMEIP_MAJOR_VERSION} + OUTPUT_NAME ${VSOMEIP_NAME}-e2e + EXPORT_NAME vsomeip3-e2e ) -if(MSVC) - set_target_properties(${VSOMEIP_NAME}-e2e PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") -endif() - +target_compile_definitions(vsomeip3-e2e PUBLIC $<$:VSOMEIP_DLL_COMPILATION_PLUGIN>) target_link_libraries( - ${VSOMEIP_NAME}-e2e - ${VSOMEIP_NAME} - ${Boost_LIBRARIES} - ${USE_RT} - ${DL_LIBRARY} - ${SystemD_LIBRARIES} + vsomeip3-e2e + PUBLIC vsomeip3 + PRIVATE RT_INTERFACE DL_INTERFACE OS_INTERFACE ) -if(${CMAKE_SYSTEM_NAME} MATCHES "QNX") - target_link_libraries(${VSOMEIP_NAME}-e2e socket) -endif() # ###################################################################################################################### # Compatibility library # ###################################################################################################################### -if(VSOMEIP_ENABLE_COMPAT EQUAL 1) +if(ENABLE_COMPAT) set(VSOMEIP_COMPAT_MAJOR_VERSION 2) set(VSOMEIP_COMPAT_VERSION ${VSOMEIP_COMPAT_MAJOR_VERSION}.99.99) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVSOMEIP_ENABLE_COMPAT") + add_definitions(-DVSOMEIP_ENABLE_COMPAT) file( GLOB_RECURSE - ${VSOMEIP_COMPAT_NAME}_SRC + vsomeip3_compat_SRC "implementation/compat/logging/src/*.cpp" "implementation/compat/message/src/*.cpp" "implementation/compat/runtime/src/*.cpp" ) - list(SORT ${VSOMEIP_COMPAT_NAME}_SRC) + list(SORT vsomeip3_compat_SRC) - add_library(${VSOMEIP_COMPAT_NAME} SHARED ${${VSOMEIP_COMPAT_NAME}_SRC}) + add_library(vsomeip3-compat SHARED ${vsomeip3_compat_SRC}) + target_compile_definitions(vsomeip3-compat PUBLIC $<$:VSOMEIP_DLL_COMPILATION_PLUGIN>) set_target_properties( - ${VSOMEIP_COMPAT_NAME} PROPERTIES + vsomeip3-compat PROPERTIES VERSION ${VSOMEIP_COMPAT_VERSION} SOVERSION ${VSOMEIP_COMPAT_MAJOR_VERSION} + OUTPUT_NAME ${VSOMEIP_COMPAT_NAME} + EXPORT_NAME vsomeip3-compat ) - if(MSVC) - set_target_properties(${VSOMEIP_COMPAT_NAME} PROPERTIES COMPILE_DEFINITIONS "VSOMEIP_DLL_COMPILATION_PLUGIN") - endif() - target_include_directories( - ${VSOMEIP_COMPAT_NAME} + vsomeip3-compat PUBLIC $ $ # for generated files in build mode + $ $ # for clients in install mode ) target_link_libraries( - ${VSOMEIP_COMPAT_NAME} - PRIVATE ${VSOMEIP_NAME} + vsomeip3-compat + PRIVATE vsomeip3 ${Boost_LIBRARIES} - ${USE_RT} - ${DL_LIBRARY} - ${SystemD_LIBRARIES} + RT_INTERFACE + DL_INTERFACE + OS_INTERFACE ) endif() @@ -509,13 +537,14 @@ set(EXAMPLE_CONFIG_FILES # Configuration parameters # ###################################################################################################################### if(${CMAKE_SYSTEM_NAME} MATCHES "QNX") - set(VSOMEIP_BASE_PATH "/var") + set(VSOMEIP_BASE_PATH_DEFAULT "/var") else() - set(VSOMEIP_BASE_PATH "/tmp") -endif() -if(BASE_PATH) - set(VSOMEIP_BASE_PATH ${BASE_PATH}) + set(VSOMEIP_BASE_PATH_DEFAULT "/tmp") endif() +set(VSOMEIP_BASE_PATH + ${VSOMEIP_BASE_PATH_DEFAULT} + CACHE PATH "Base path for vsomeip sockets" +) set(VSOMEIP_DIAGNOSIS_ADDRESS "0x01") if(DIAGNOSIS_ADDRESS) @@ -590,23 +619,22 @@ foreach(file ${vsomeip_INCLUDE}) endforeach() install( - TARGETS ${VSOMEIP_NAME} + TARGETS vsomeip3 # IMPORTANT: Add the vsomeip library to the "export-set" - EXPORT - ${VSOMEIP_NAME}Targets + EXPORT vsomeip3Targets RUNTIME DESTINATION "${INSTALL_BIN_DIR}" - COMPONENT + COMPONENT bin LIBRARY DESTINATION "${INSTALL_LIB_DIR}" - COMPONENT + COMPONENT shlib ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT dev ) install( - TARGETS ${VSOMEIP_NAME}-e2e LIBRARY + TARGETS vsomeip3-e2e LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib RUNTIME @@ -614,9 +642,9 @@ install( COMPONENT bin ) -if(VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 0) +if(NOT ENABLE_MULTIPLE_ROUTING_MANAGERS) install( - TARGETS ${VSOMEIP_NAME}-cfg LIBRARY + TARGETS vsomeip3-cfg LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib RUNTIME @@ -626,7 +654,7 @@ if(VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 0) endif() install( - TARGETS ${VSOMEIP_NAME}-sd LIBRARY + TARGETS vsomeip3-sd LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib RUNTIME @@ -634,11 +662,10 @@ install( COMPONENT bin ) -if(VSOMEIP_ENABLE_COMPAT EQUAL 1) +if(ENABLE_COMPAT) install( - TARGETS ${VSOMEIP_COMPAT_NAME} - EXPORT - vsomeipTargets + TARGETS vsomeip3-compat + EXPORT vsomeipTargets LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib @@ -647,13 +674,13 @@ if(VSOMEIP_ENABLE_COMPAT EQUAL 1) COMPONENT bin ) - export(TARGETS ${VSOMEIP_COMPAT_NAME} FILE "${PROJECT_BINARY_DIR}/vsomeipTargets.cmake") - export(PACKAGE ${VSOMEIP_COMPAT_NAME}) + export(TARGETS vsomeip3-compat FILE "${PROJECT_BINARY_DIR}/vsomeipTargets.cmake") + export(PACKAGE vsomeip3-compat) configure_file(vsomeipConfig.cmake.in "${PROJECT_BINARY_DIR}/vsomeipConfig.cmake" @ONLY) configure_file(vsomeipConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/vsomeipConfigVersion.cmake" @ONLY) - set(COMPAT_INSTALL_CMAKE_DIR "lib/cmake/${VSOMEIP_COMPAT_NAME}") + set(COMPAT_INSTALL_CMAKE_DIR "lib/cmake/vsomeip3-compat") install( EXPORT @@ -682,24 +709,24 @@ install( ) # Add all targets to the build-tree export set -export(TARGETS ${VSOMEIP_NAME} FILE "${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}Targets.cmake") +export(TARGETS vsomeip3 FILE "${PROJECT_BINARY_DIR}/vsomeip3Targets.cmake") # Export the package for use from the build-tree (this registers the build-tree with a global CMake-registry) -export(PACKAGE ${VSOMEIP_NAME}) +export(PACKAGE vsomeip3) -# Create the ${VSOMEIP_NAME}Config.cmake and ${VSOMEIP_NAME}ConfigVersion files -configure_file(${VSOMEIP_NAME}Config.cmake.in "${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}Config.cmake" @ONLY) -configure_file(${VSOMEIP_NAME}ConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}ConfigVersion.cmake" @ONLY) +# Create the vsomeip3Config.cmake and vsomeip3ConfigVersion files +configure_file(vsomeip3Config.cmake.in "${PROJECT_BINARY_DIR}/vsomeip3Config.cmake" @ONLY) +configure_file(vsomeip3ConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/vsomeip3ConfigVersion.cmake" @ONLY) # configure internal.hpp for correct version number configure_file( "${PROJECT_SOURCE_DIR}/implementation/configuration/include/internal.hpp.in" - "${PROJECT_SOURCE_DIR}/implementation/configuration/include/internal.hpp" + "${PROJECT_BINARY_DIR}/implementation/configuration/include/internal.hpp" ) -# Install the ${VSOMEIP_NAME}Config.cmake and ${VSOMEIP_NAME}ConfigVersion.cmake +# Install the vsomeip3Config.cmake and vsomeip3ConfigVersion.cmake install( - FILES "${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}Config.cmake" "${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}ConfigVersion.cmake" + FILES "${PROJECT_BINARY_DIR}/vsomeip3Config.cmake" "${PROJECT_BINARY_DIR}/vsomeip3ConfigVersion.cmake" DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev ) @@ -707,7 +734,7 @@ install( # Install the export set for use with the install-tree install( EXPORT - ${VSOMEIP_NAME}Targets + vsomeip3Targets DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT @@ -778,8 +805,8 @@ endif() # ###################################################################################################################### # create pkg-config file if(NOT WIN32) - configure_file(${VSOMEIP_NAME}.pc.in ${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}.pc @ONLY) - install(FILES ${PROJECT_BINARY_DIR}/${VSOMEIP_NAME}.pc DESTINATION lib/pkgconfig) + configure_file(vsomeip3.pc.in ${PROJECT_BINARY_DIR}/vsomeip3.pc @ONLY) + install(FILES ${PROJECT_BINARY_DIR}/vsomeip3.pc DESTINATION lib/pkgconfig) endif() # ###################################################################################################################### @@ -797,6 +824,7 @@ add_custom_target(examples) add_subdirectory(examples EXCLUDE_FROM_ALL) # ###################################################################################################################### + # add test directory enable_testing() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 3ce54832c..a3913a70a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,7 +1,8 @@ -# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) This Source Code Form is subject to the +# terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain +# one at http://mozilla.org/MPL/2.0/. + +cmake_minimum_required(VERSION 3.15) set(EXAMPLE_CONFIG_FILES "../config/vsomeip.json" @@ -14,22 +15,53 @@ set(EXAMPLE_CONFIG_FILES # Examples add_executable(request-sample request-sample.cpp ${EXAMPLE_CONFIG_FILES}) -target_link_libraries(request-sample ${VSOMEIP_NAME} ${Boost_LIBRARIES} ${DL_LIBRARY}) +target_link_libraries( + request-sample + vsomeip3 + ${Boost_LIBRARIES} + DL_INTERFACE +) add_executable(response-sample response-sample.cpp ${EXAMPLE_CONFIG_FILES}) -target_link_libraries(response-sample ${VSOMEIP_NAME} ${Boost_LIBRARIES} ${DL_LIBRARY}) +target_link_libraries( + response-sample + vsomeip3 + ${Boost_LIBRARIES} + DL_INTERFACE +) add_executable(subscribe-sample subscribe-sample.cpp ${EXAMPLE_CONFIG_FILES}) -target_link_libraries(subscribe-sample ${VSOMEIP_NAME} ${Boost_LIBRARIES} ${DL_LIBRARY}) +target_link_libraries( + subscribe-sample + vsomeip3 + ${Boost_LIBRARIES} + DL_INTERFACE +) add_executable(notify-sample notify-sample.cpp ${EXAMPLE_CONFIG_FILES}) -target_link_libraries(notify-sample ${VSOMEIP_NAME} ${Boost_LIBRARIES} ${DL_LIBRARY}) +target_link_libraries( + notify-sample + vsomeip3 + ${Boost_LIBRARIES} + DL_INTERFACE +) -add_dependencies(examples request-sample response-sample subscribe-sample notify-sample) +add_dependencies( + examples + request-sample + response-sample + subscribe-sample + notify-sample +) -install ( - TARGETS request-sample response-sample subscribe-sample notify-sample - RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin +install( + TARGETS request-sample + response-sample + subscribe-sample + notify-sample + RUNTIME + DESTINATION "${INSTALL_BIN_DIR}" + COMPONENT bin ) -################################################################################################### +# ###################################################################################################################### diff --git a/examples/hello_world/CMakeLists.txt b/examples/hello_world/CMakeLists.txt index 31b7358dc..be84d480c 100644 --- a/examples/hello_world/CMakeLists.txt +++ b/examples/hello_world/CMakeLists.txt @@ -2,23 +2,31 @@ # terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain # one at http://mozilla.org/MPL/2.0/. -cmake_minimum_required(VERSION 2.8.7) +cmake_minimum_required(VERSION 3.15) project(vSomeIPHelloWorld) find_package(Threads REQUIRED) -set(VSOMEIP_NAME "vsomeip3") +include(GNUInstallDirs) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") +set(INSTALL_BIN_DIR + ${CMAKE_INSTALL_BINDIR} + CACHE STRING "Installation directory for executables" +) -include_directories(${VSOMEIP_INCLUDE_DIRS}) +add_library(vsomeip_hello_world_example INTERFACE) +target_compile_features(vsomeip_hello_world_example INTERFACE cxx_std_17) +if(ENABLE_SIGNAL_HANDLING) + target_compile_definitions(vsomeip_hello_world_example INTERFACE VSOMEIP_ENABLE_SIGNAL_HANDLING) +endif() add_library(vsomeip_hello_world_service INTERFACE) target_sources(vsomeip_hello_world_service INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/hello_world_service.hpp") -target_include_directories(vsomeip_hello_world_service INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") +target_link_libraries(vsomeip_hello_world_service INTERFACE vsomeip_hello_world_example) add_library(vsomeip_hello_world_client INTERFACE) target_sources(vsomeip_hello_world_client INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/hello_world_client.hpp") +target_link_libraries(vsomeip_hello_world_client INTERFACE vsomeip_hello_world_example) target_include_directories(vsomeip_hello_world_client INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") @@ -27,26 +35,24 @@ if(NOT MATCHES "Android" ) - # This will get us acces to VSOMEIP_INCLUDE_DIRS - include directories for vSomeIP VSOMEIP_LIBRARIES - libraries to - # link against - find_package(${VSOMEIP_NAME}) - if(NOT ${VSOMEIP_NAME}_FOUND) - message("${VSOMEIP_NAME} was not found. Please specify vsomeip_DIR") + # This will get us acces to the vsomeip target, along with VSOMEIP_INCLUDE_DIRS - include directories for vSomeIP + # VSOMEIP_LIBRARIES - libraries to link against + if(NOT TARGET vsomeip3) + find_package(vsomeip3) + if(NOT vsomeip3_FOUND) + message("vsomeip was not found. Please specify vsomeip_DIR") + endif() endif() add_executable(hello_world_service hello_world_service_main.cpp) - target_link_libraries( - hello_world_service - vsomeip_hello_world_service - ${VSOMEIP_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ) + target_link_libraries(hello_world_service PUBLIC vsomeip_hello_world_service vsomeip3 Threads::Threads) add_executable(hello_world_client hello_world_client_main.cpp) - target_link_libraries( - hello_world_client - vsomeip_hello_world_client - ${VSOMEIP_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} + target_link_libraries(hello_world_client PUBLIC vsomeip_hello_world_client vsomeip3 Threads::Threads) + + install( + TARGETS hello_world_client hello_world_service RUNTIME + DESTINATION "${INSTALL_BIN_DIR}" + COMPONENT example-hello_world ) endif() diff --git a/examples/routingmanagerd/CMakeLists.txt b/examples/routingmanagerd/CMakeLists.txt index 0a2782fea..2b7c5700e 100644 --- a/examples/routingmanagerd/CMakeLists.txt +++ b/examples/routingmanagerd/CMakeLists.txt @@ -2,22 +2,29 @@ # terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain # one at http://mozilla.org/MPL/2.0/. +cmake_minimum_required(VERSION 3.15) + +option(VSOMEIP_INSTALL_ROUTINGMANAGERD "Whether or not to install the routing manager daemon.") + # Daemon -add_executable(routingmanagerd routingmanagerd.cpp) +add_executable(routingmanagerd) +target_sources(routingmanagerd PRIVATE routingmanagerd.cpp) + +if(TARGET Genivi::dlt) + target_compile_definitions(routingmanagerd PRIVATE USE_DLT) + target_link_libraries(routingmanagerd PRIVATE Genivi::dlt) +endif() + target_link_libraries( routingmanagerd - ${VSOMEIP_NAME} - ${Boost_LIBRARIES} - ${DL_LIBRARY} - ${DLT_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} + PRIVATE vsomeip3 + Boost::system + STACKTRACE_INTERFACE + OS_INTERFACE + DL_INTERFACE + RT_INTERFACE + Threads::Threads ) -if(${CMAKE_SYSTEM_NAME} MATCHES "QNX") - target_link_libraries(routingmanagerd socket) -endif() -add_dependencies(routingmanagerd ${VSOMEIP_NAME}) - -option(VSOMEIP_INSTALL_ROUTINGMANAGERD "Whether or not to install the routing manager daemon.") if(VSOMEIP_INSTALL_ROUTINGMANAGERD) install( diff --git a/test/benchmark_tests/CMakeLists.txt b/test/benchmark_tests/CMakeLists.txt index ebc51f917..2801544cd 100644 --- a/test/benchmark_tests/CMakeLists.txt +++ b/test/benchmark_tests/CMakeLists.txt @@ -1,31 +1,41 @@ -# Copyright (C) 2015-2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Copyright (C) 2015-2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) This Source Code Form is subject to the +# terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain +# one at http://mozilla.org/MPL/2.0/. -project ("benchmark_tests_bin" LANGUAGES CXX) +project("benchmark_tests_bin" LANGUAGES CXX) -file (GLOB SRCS main.cpp **/*.cpp) +file( + GLOB + SRCS + main.cpp + **/*.cpp + ../common/utility.cpp +) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) -find_package(Boost 1.55 COMPONENTS filesystem system REQUIRED) +find_package( + Boost 1.65 + COMPONENTS filesystem system + REQUIRED +) # ---------------------------------------------------------------------------- # Executable and libraries to link # ---------------------------------------------------------------------------- -add_executable (${PROJECT_NAME} ${SRCS} ) -target_link_libraries ( - ${PROJECT_NAME} - vsomeip3 - vsomeip3-cfg - Threads::Threads - ${Boost_LIBRARIES} - ${DL_LIBRARY} - benchmark::benchmark - gtest - vsomeip_utilities +add_executable(vsomeip3-benchmark-tests) +target_sources(vsomeip3-benchmark-tests PRIVATE ${SRCS}) +target_link_libraries( + vsomeip3-benchmark-tests + PRIVATE vsomeip3 + vsomeip3-cfg + Threads::Threads + Boost::filesystem + Boost::system + benchmark::benchmark + gtest + DL_INTERFACE ) -add_dependencies(build_benchmark_tests ${PROJECT_NAME}) +add_dependencies(build_benchmark_tests vsomeip3-benchmark-tests) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index d01e7cbde..0e836f647 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -2,14 +2,18 @@ # terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain # one at http://mozilla.org/MPL/2.0/. +cmake_minimum_required(VERSION 3.15) + # vsomeip_ctrl add_executable(vsomeip_ctrl EXCLUDE_FROM_ALL vsomeip_ctrl.cpp) target_link_libraries( vsomeip_ctrl - vsomeip3 - ${Boost_LIBRARIES} - ${DL_LIBRARY} - ${CMAKE_THREAD_LIBS_INIT} + PUBLIC vsomeip3 + PRIVATE Boost::filesystem DL_INTERFACE Threads::Threads ) -# ###################################################################################################################### +install( + TARGETS vsomeip_ctrl RUNTIME + COMPONENT vsomeip_ctrl + EXCLUDE_FROM_ALL +)