diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-04-21 21:32:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 21:32:58 +0200 |
commit | ef92b5a9948f2fb6042ae0c842bfb4301b1894c3 (patch) | |
tree | a414aecd40748c3cf837feea404baeacaf27b075 | |
parent | 936b78e811a4264c914dbc4753f591b8a3a0f7ff (diff) | |
download | rneovim-ef92b5a9948f2fb6042ae0c842bfb4301b1894c3.tar.gz rneovim-ef92b5a9948f2fb6042ae0c842bfb4301b1894c3.tar.bz2 rneovim-ef92b5a9948f2fb6042ae0c842bfb4301b1894c3.zip |
build: include all dependency directories when generating headers
This will add all interface include directories property from all
targets to main_lib. This may not be universally wanted, in which case
we can revisit/rework it.
Closes https://github.com/neovim/neovim/issues/23237.
-rwxr-xr-x | src/nvim/CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index f15a255ec5..efa6b3620a 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -407,11 +407,14 @@ foreach(gen_cdef DO_NOT_DEFINE_EMPTY_ATTRIBUTES ${prop}) endif() endforeach() -get_target_property(prop main_lib INTERFACE_INCLUDE_DIRECTORIES) -foreach(gen_include ${prop}) - list(APPEND gen_cflags "-I${gen_include}") +get_directory_property(targets BUILDSYSTEM_TARGETS) +foreach(target ${targets}) + get_target_property(prop ${target} INTERFACE_INCLUDE_DIRECTORIES) + foreach(gen_include ${prop}) + list(APPEND gen_cflags "-I${gen_include}") + endforeach() endforeach() -list(APPEND gen_cflags "-I${DEPS_PREFIX}/include") + if(APPLE AND CMAKE_OSX_SYSROOT) list(APPEND gen_cflags "-isysroot") list(APPEND gen_cflags "${CMAKE_OSX_SYSROOT}") |