diff --git a/lib/open-amp/CMakeLists.txt b/lib/open-amp/CMakeLists.txt index 393d5c2aaa4..b409e2c4700 100644 --- a/lib/open-amp/CMakeLists.txt +++ b/lib/open-amp/CMakeLists.txt @@ -5,13 +5,20 @@ # SPDX-License-Identifier: Apache-2.0 # -zephyr_include_directories_ifdef(CONFIG_OPENAMP_RSC_TABLE .) - -# include vendor-specific resource table files -if(CONFIG_OPENAMP_VENDOR_RSC_TABLE) - zephyr_sources(vendor/${CONFIG_OPENAMP_VENDOR_RSC_TABLE_FILE}) +# include vendor-specific resources +if(CONFIG_OPENAMP_VENDOR_RSC_TABLE OR CONFIG_OPENAMP_VENDOR_ADDR_TRANSLATION) zephyr_include_directories(vendor) -elseif(CONFIG_OPENAMP_RSC_TABLE) -# include generic resource table - zephyr_sources(resource_table.c) +endif() + +if(CONFIG_OPENAMP_RSC_TABLE) + zephyr_include_directories(.) + # include generic address translation ops + zephyr_sources(addr_translation.c) + # include vendor-specific resource table files + if(CONFIG_OPENAMP_VENDOR_RSC_TABLE) + zephyr_sources(vendor/${CONFIG_OPENAMP_VENDOR_RSC_TABLE_FILE}) + else() + # include generic resource table + zephyr_sources(resource_table.c) + endif() endif()