mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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.
This commit is contained in:
parent
d3c8d104bc
commit
29a43ef8af
@ -34,11 +34,11 @@ if(HAS_OG_FLAG)
|
|||||||
set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS})
|
set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr" CACHE PATH "Dependencies install directory.")
|
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr")
|
||||||
set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin" CACHE PATH "Dependencies binary install directory.")
|
set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin")
|
||||||
set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib" CACHE PATH "Dependencies library install directory.")
|
set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib")
|
||||||
set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build" CACHE PATH "Dependencies build directory.")
|
set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build")
|
||||||
set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependencies download directory.")
|
set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads")
|
||||||
|
|
||||||
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR})
|
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR})
|
||||||
|
|
||||||
|
@ -393,6 +393,7 @@ get_target_property(prop main_lib INTERFACE_INCLUDE_DIRECTORIES)
|
|||||||
foreach(gen_include ${prop})
|
foreach(gen_include ${prop})
|
||||||
list(APPEND gen_cflags "-I${gen_include}")
|
list(APPEND gen_cflags "-I${gen_include}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
list(APPEND gen_cflags "-I${DEPS_PREFIX}/include")
|
||||||
if(APPLE AND CMAKE_OSX_SYSROOT)
|
if(APPLE AND CMAKE_OSX_SYSROOT)
|
||||||
list(APPEND gen_cflags "-isysroot")
|
list(APPEND gen_cflags "-isysroot")
|
||||||
list(APPEND gen_cflags "${CMAKE_OSX_SYSROOT}")
|
list(APPEND gen_cflags "${CMAKE_OSX_SYSROOT}")
|
||||||
|
Loading…
Reference in New Issue
Block a user