Integrate SDK in Adaptive Project
You can use the Adaptive SDK in your CMake projects and save time compiling. It is as simple as adding a few lines to your project-wide CMake configurations in the CMakeLists.txt.
|
File Location: |
Steps
-
Prerequisite: The Adaptive SDK was created and is made available.
-
Prerequisite: Your system fulfills the system requirements of the MICROSAR Adaptive BSW package
-
Specify the SDK path.
-
Locate the AMSR package with
find_package(). -
Integrate the generated CMake files into the project.
-
Link against the appropriate targets.
CMakeLists.txt
# Set the search location for the AMSR SDK
set(AMSR_ROOT "path/to/AdaptiveSDK")
# Find CMake Config files of AMSR package
# Simple command (Missing targets are found at build time)
# find_package(AMSR REQUIRED)
# Advanced command (Missing targets are found at configuration time)
find_package(AMSR
COMPONENTS ves::vac
REQUIRED
)
# The variable "target" is important here because it is expected
# in the generated CMake files
set(target MyAdaptiveApplication)
# Please note: SRC_GEN_DIR locates to the folder where the code is
# generated
file(GLOB LIST_OF_SRC_GEN_CMAKE_FILES "${SRC_GEN_DIR}/MyAdaptiveApplication/*.cmake")
block()
foreach(CMAKEFILE_TO_INCLUDE IN LISTS LIST_OF_SRC_GEN_CMAKE_FILES)
include(${CMAKEFILE_TO_INCLUDE})
endforeach()
endblock()
# Specify the libraries to be linked into the user build artifact
target_link_libraries(
MyAdaptiveApplication
PRIVATE
ves::vac
)
Components / Link Targets
|
The list of pre-built and installed targets (libraries and/or executables) may vary depending on the content of the delivery. In addition, the number of available targets depends on the build configuration. |
| Component / Target | Cluster |
|---|---|
ves::applicationbase |
Base Libraries |
ves::vac |
Base Libraries |
ves::com_default |
Communication |
ves::com_r18_03 |
Communication |
ves::com_r20_11 |
Communication |
ves::comtrace |
Communication |
ves::ipcbinding |
Communication |
ves::someipbinding |
Communication |
ves::someipprotocol |
Communication |
ves::zerocopybinding |
Communication |
ves::aradiag |
Diagnostics |
ves::em_application_client |
Execution Management |
ves::em_state_client |
Execution Management |
ves::log |
LOG |
ves::log_ara_logging |
LOG |
ves::osa_common |
Operating System |
ves::osa_net |
Operating System |
ves::per |
Persistency |
ves::sm_functiongroupcontrol |
State Management |
ves::sm_lifecycle |
State Management |
ves::sm_runtime |
State Management |
ves::sm_statemachine |
State Management |
|
Reference: To find the CMake link targets for a certain component,
please refer to the Technical Reference at
|