diff options
Diffstat (limited to 'third-party/CMakeLists.txt')
-rw-r--r-- | third-party/CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index df7f1a0ac2..f9da7c497a 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -21,7 +21,17 @@ 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.") +if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + # pkg-config 29.2 has a bug on OpenBSD which causes it to drop any paths that + # *contain* system include paths. To avoid this, we prefix what would be + # "/usr/include" as "/_usr/include". + # This check is also performed in the root CMakeLists.txt + # https://github.com/neovim/neovim/pull/14745#issuecomment-860201794 + set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/_usr" CACHE PATH "Dependencies install directory.") +else() + set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr" CACHE PATH "Dependencies install directory.") +endif() + 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.") |