diff options
author | Daniel Hahler <git@thequod.de> | 2019-06-28 02:02:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 02:02:19 +0200 |
commit | 6765bbc651942b8dc67ab1a14abf4eab1929e3b6 (patch) | |
tree | 16efbf8324467d75487a7f3c88b9e26121b58b74 /cmake/FindLuaJit.cmake | |
parent | 9f64e4b73faace89d89f3b2db91feab1f2d15e6f (diff) | |
download | rneovim-6765bbc651942b8dc67ab1a14abf4eab1929e3b6.tar.gz rneovim-6765bbc651942b8dc67ab1a14abf4eab1929e3b6.tar.bz2 rneovim-6765bbc651942b8dc67ab1a14abf4eab1929e3b6.zip |
build: CMake: remove usage of USE_BUNDLED_X in main project (#10354)
The variables are not meant to be defined there really, but only with
the third-party project.
Using them, e.g. with the following, would actually result in libvterm
not being found then:
make CMAKE_EXTRA_FLAGS="-DUSE_BUNDLED_LIBVTERM=ON" \
DEPS_CMAKE_FLAGS="-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBVTERM=ON"
In https://github.com/neovim/neovim/pull/6357 they were renamed to
`USE_BUNDLED_X` from `X_USE_BUNDLED`, but the above reasoning applies
to the old names, too.
Internally `CMAKE_PREFIX_PATH` is used to add the built/bundled third
party packages for `find_package`, so there is no reason to e.g. query
the values via `load_cache` for example from the third-party project.
Diffstat (limited to 'cmake/FindLuaJit.cmake')
-rw-r--r-- | cmake/FindLuaJit.cmake | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/cmake/FindLuaJit.cmake b/cmake/FindLuaJit.cmake index b8eda6388b..aad0ce7b85 100644 --- a/cmake/FindLuaJit.cmake +++ b/cmake/FindLuaJit.cmake @@ -4,25 +4,16 @@ # LUAJIT_INCLUDE_DIRS - The luajit include directories # LUAJIT_LIBRARIES - The libraries needed to use luajit -if(NOT USE_BUNDLED_LUAJIT) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(PC_LUAJIT QUIET luajit) - endif() -else() - set(PC_LUAJIT_INCLUDEDIR) - set(PC_LUAJIT_INCLUDE_DIRS) - set(PC_LUAJIT_LIBDIR) - set(PC_LUAJIT_LIBRARY_DIRS) - set(LIMIT_SEARCH NO_DEFAULT_PATH) +find_package(PkgConfig) +if (PKG_CONFIG_FOUND) + pkg_check_modules(PC_LUAJIT QUIET luajit) endif() set(LUAJIT_DEFINITIONS ${PC_LUAJIT_CFLAGS_OTHER}) find_path(LUAJIT_INCLUDE_DIR luajit.h PATHS ${PC_LUAJIT_INCLUDEDIR} ${PC_LUAJIT_INCLUDE_DIRS} - PATH_SUFFIXES luajit-2.0 - ${LIMIT_SEARCH}) + PATH_SUFFIXES luajit-2.0) # If we're asked to use static linkage, add libluajit-5.1.a as a preferred # library name. @@ -40,8 +31,7 @@ else() endif() find_library(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES} - PATHS ${PC_LUAJIT_LIBDIR} ${PC_LUAJIT_LIBRARY_DIRS} - ${LIMIT_SEARCH}) + PATHS ${PC_LUAJIT_LIBDIR} ${PC_LUAJIT_LIBRARY_DIRS}) set(LUAJIT_LIBRARIES ${LUAJIT_LIBRARY}) set(LUAJIT_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR}) |