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/FindLibTermkey.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/FindLibTermkey.cmake')
-rw-r--r-- | cmake/FindLibTermkey.cmake | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/cmake/FindLibTermkey.cmake b/cmake/FindLibTermkey.cmake index 66fd2e6c89..6e09a692c8 100644 --- a/cmake/FindLibTermkey.cmake +++ b/cmake/FindLibTermkey.cmake @@ -4,24 +4,15 @@ # LIBTERMKEY_INCLUDE_DIRS - The libtermkey include directories # LIBTERMKEY_LIBRARIES - The libraries needed to use libtermkey -if(NOT USE_BUNDLED_LIBTERMKEY) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(PC_LIBTERMKEY QUIET termkey) - endif() -else() - set(PC_LIBTERMKEY_INCLUDEDIR) - set(PC_LIBTERMKEY_INCLUDE_DIRS) - set(PC_LIBTERMKEY_LIBDIR) - set(PC_LIBTERMKEY_LIBRARY_DIRS) - set(LIMIT_SEARCH NO_DEFAULT_PATH) +find_package(PkgConfig) +if (PKG_CONFIG_FOUND) + pkg_check_modules(PC_LIBTERMKEY QUIET termkey) endif() set(LIBTERMKEY_DEFINITIONS ${PC_LIBTERMKEY_CFLAGS_OTHER}) find_path(LIBTERMKEY_INCLUDE_DIR termkey.h - PATHS ${PC_LIBTERMKEY_INCLUDEDIR} ${PC_LIBTERMKEY_INCLUDE_DIRS} - ${LIMIT_SEARCH}) + PATHS ${PC_LIBTERMKEY_INCLUDEDIR} ${PC_LIBTERMKEY_INCLUDE_DIRS}) # If we're asked to use static linkage, add libuv.a as a preferred library name. if(LIBTERMKEY_USE_STATIC) @@ -32,8 +23,7 @@ endif() list(APPEND LIBTERMKEY_NAMES termkey) find_library(LIBTERMKEY_LIBRARY NAMES ${LIBTERMKEY_NAMES} - HINTS ${PC_LIBTERMKEY_LIBDIR} ${PC_LIBTERMKEY_LIBRARY_DIRS} - ${LIMIT_SEARCH}) + HINTS ${PC_LIBTERMKEY_LIBDIR} ${PC_LIBTERMKEY_LIBRARY_DIRS}) set(LIBTERMKEY_LIBRARIES ${LIBTERMKEY_LIBRARY}) set(LIBTERMKEY_INCLUDE_DIRS ${LIBTERMKEY_INCLUDE_DIR}) |