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:
patrick96 2021-02-23 09:48:33 +01:00 committed by Patrick Ziegler
parent cd71b96cf8
commit 63819d62f0

View File

@ -117,8 +117,8 @@ function(create_imported_target library_name includes libraries)
add_library(${library_name} INTERFACE IMPORTED)
set_target_properties(${library_name} PROPERTIES
INTERFACE_LINK_LIBRARIES "${libraries}"
INTERFACE_INCLUDE_DIRECTORIES "${includes}"
)
target_include_directories(${library_name} SYSTEM INTERFACE ${includes})
endfunction()
# }}}
# checklib {{{