diff options
author | Rui Abreu Ferreira <raf-ep@gmx.com> | 2014-12-11 17:17:20 +0000 |
---|---|---|
committer | Rui Abreu Ferreira <raf-ep@gmx.com> | 2014-12-16 10:28:43 +0000 |
commit | 8d54a7203efe49ec7693c59e9e45d0389c520df3 (patch) | |
tree | 66a0e529b59a22dea767217aa7c9e787b2c83121 | |
parent | 64d78c0b7d71304bd830ffd5c4e3aca446b82a1b (diff) | |
download | rneovim-8d54a7203efe49ec7693c59e9e45d0389c520df3.tar.gz rneovim-8d54a7203efe49ec7693c59e9e45d0389c520df3.tar.bz2 rneovim-8d54a7203efe49ec7693c59e9e45d0389c520df3.zip |
Allow cmake caller to override DEPS_PREFIX
- Caller can override bundled dependency location using
DEPS_PREFIX
- Cache variable DEPS_PREFIX, using .deps/usr by default
- Removed unused variables DEPS_BIN_DIR, DEPS_BUILD_DIR, DEPS_DIR
DEPS_INSTALL_DIR
- Corner case: if the caller tries to override DEPS_PREFIX after a
successful cmake configuration, the caller needs to clear the cache
because dependency checks are based on the old value
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 20d653a082..fd5f51ccc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,12 +5,8 @@ project(NEOVIM) list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") # Prefer our bundled versions of dependencies. -set(DEPS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.deps") -set(DEPS_BUILD_DIR "${DEPS_DIR}/build") -set(DEPS_INSTALL_DIR "${DEPS_DIR}/usr") -set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin") - -list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR}) +set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies") +list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") # CMake tries to treat /sw and /opt/local as extension of the system path, but |