From 1957ed269cdc2f878bf5d1924dadac12dece82f2 Mon Sep 17 00:00:00 2001 From: Taras Zaporozhets Date: Tue, 26 Dec 2023 16:23:28 +0100 Subject: [PATCH] lib: Add include directory to open_amp-static target Include a header directory in the open_amp-static target, enabling building and linking static library using CMake subdirectory. Signed-off-by: Taras Zaporozhets --- lib/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index ff2e399..f8f9e2f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -61,6 +61,7 @@ else (WITH_ZEPHYR) if (WITH_STATIC_LIB) set (_lib ${OPENAMP_LIB}-static) add_library (${_lib} STATIC ${_sources}) + target_include_directories(${_lib} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) install (TARGETS ${_lib} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) set_target_properties (${_lib} PROPERTIES OUTPUT_NAME "${OPENAMP_LIB}"