cmake: Use set_target_properties for include dirs
target_include_directories for INTERFACE IMPORTED targets is only supported since cmake 3.11 Fixes #2387 Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/15689
This commit is contained in:
parent
cd71b96cf8
commit
63819d62f0
@ -117,8 +117,8 @@ function(create_imported_target library_name includes libraries)
|
|||||||
add_library(${library_name} INTERFACE IMPORTED)
|
add_library(${library_name} INTERFACE IMPORTED)
|
||||||
set_target_properties(${library_name} PROPERTIES
|
set_target_properties(${library_name} PROPERTIES
|
||||||
INTERFACE_LINK_LIBRARIES "${libraries}"
|
INTERFACE_LINK_LIBRARIES "${libraries}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${includes}"
|
||||||
)
|
)
|
||||||
target_include_directories(${library_name} SYSTEM INTERFACE ${includes})
|
|
||||||
endfunction()
|
endfunction()
|
||||||
# }}}
|
# }}}
|
||||||
# checklib {{{
|
# checklib {{{
|
||||||
|
Loading…
Reference in New Issue
Block a user