From 8d54a7203efe49ec7693c59e9e45d0389c520df3 Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Thu, 11 Dec 2014 17:17:20 +0000 Subject: [PATCH] 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 --- CMakeLists.txt | 8 ++------ 1 file 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