diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-03-10 22:40:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 22:40:41 +0100 |
commit | 29a43ef8affbb9ecbae03b75db346205ffe9ec14 (patch) | |
tree | 08e9ca4ba47a8a7c2e9f9ec1b7e88ae8ef5a03f3 | |
parent | d3c8d104bc921a27d56d2438f98bf7e80b623e47 (diff) | |
download | rneovim-29a43ef8affbb9ecbae03b75db346205ffe9ec14.tar.gz rneovim-29a43ef8affbb9ecbae03b75db346205ffe9ec14.tar.bz2 rneovim-29a43ef8affbb9ecbae03b75db346205ffe9ec14.zip |
build: explicitly add dependency include dir for header generation
Neovim and the generated headers needs to use the same include
directories to build correctly. However, we need to generate headers
before all target dependencies has been resolved, meaning that we cannot
rely on any target to determine the final list of include directories.
This may lead to a problems when bundling some, but not all or none,
dependencies as the dependency include directory won't be included.
Also remove the dependency path options as this assumes a specific
structure on the dependency build directory.
-rw-r--r-- | cmake.deps/CMakeLists.txt | 10 | ||||
-rwxr-xr-x | src/nvim/CMakeLists.txt | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/cmake.deps/CMakeLists.txt b/cmake.deps/CMakeLists.txt index 42f97a5c2b..0d3e3886f5 100644 --- a/cmake.deps/CMakeLists.txt +++ b/cmake.deps/CMakeLists.txt @@ -34,11 +34,11 @@ if(HAS_OG_FLAG) set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS}) endif() -set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr" CACHE PATH "Dependencies install directory.") -set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin" CACHE PATH "Dependencies binary install directory.") -set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib" CACHE PATH "Dependencies library install directory.") -set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build" CACHE PATH "Dependencies build directory.") -set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependencies download directory.") +set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr") +set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin") +set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib") +set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build") +set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads") list(APPEND DEPS_CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}) diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index b02c740471..edd0b178d4 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -393,6 +393,7 @@ get_target_property(prop main_lib INTERFACE_INCLUDE_DIRECTORIES) foreach(gen_include ${prop}) list(APPEND gen_cflags "-I${gen_include}") 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}") |