From 6fac47f047ac7c62d19f25cef5de34e793fbd8ad Mon Sep 17 00:00:00 2001 From: WangWeiLin-MV <156736127+WangWeiLin-MV@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:01:24 +0800 Subject: [PATCH] Update merge_static_libs.cmake to copy INTERFACE_INCLUDE_DIRECTORIES (#2505) --- cmake/Modules/merge_static_libs.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/Modules/merge_static_libs.cmake b/cmake/Modules/merge_static_libs.cmake index 2f4826770e..16aac576bb 100644 --- a/cmake/Modules/merge_static_libs.cmake +++ b/cmake/Modules/merge_static_libs.cmake @@ -52,6 +52,11 @@ function(merge_static_libs target in_target) set(source_file ${CMAKE_CURRENT_BINARY_DIR}/${target}_depends.c) add_library(${target} STATIC ${source_file}) + get_target_property(include_dirs ${in_target} INTERFACE_INCLUDE_DIRECTORIES) + if(include_dirs) + target_include_directories(${target} PUBLIC ${include_dirs}) + endif() + avif_collect_deps(${in_target} lib_deps) foreach(lib ${lib_deps})