build: properly propagate included directories from dependencies
This commit is contained in:
@@ -193,6 +193,20 @@ function(build_lib)
|
||||
${lib${BLIB_LIBNAME}} ${exported_libraries} ${private_libraries}
|
||||
)
|
||||
|
||||
if(NOT ${XCODE})
|
||||
# Since linking libraries to object libraries in not allowed in older CMake
|
||||
# releases, we need to import each of their include directories. Otherwise,
|
||||
# include directories won't be properly propagated
|
||||
set(temp)
|
||||
foreach(target ${ns_libraries_to_link})
|
||||
list(APPEND temp
|
||||
"$<TARGET_PROPERTY:${target},INTERFACE_INCLUDE_DIRECTORIES>"
|
||||
)
|
||||
endforeach()
|
||||
target_include_directories(${lib${BLIB_LIBNAME}}-obj PRIVATE ${temp})
|
||||
unset(temp)
|
||||
endif()
|
||||
|
||||
# set output name of library
|
||||
set_target_properties(
|
||||
${lib${BLIB_LIBNAME}}
|
||||
|
||||
Reference in New Issue
Block a user