From 9fa7828f39ed0cafed8fa0b90a45309316c7d40a Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 31 Dec 2018 08:48:47 +0800 Subject: [PATCH] make more directories configurable --- CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f2c67e..2833d93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,12 +19,16 @@ endif() message(STATUS MONERO_DIR ": ${MONERO_DIR}") -set(MONERO_SOURCE_DIR ${MONERO_DIR} - CACHE PATH "Path to the root directory for Monero") +if (NOT MONERO_SOURCE_DIR) + set(MONERO_SOURCE_DIR ${MONERO_DIR} + CACHE PATH "Path to the root directory for Monero") +endif() -# set location of monero build tree -set(MONERO_BUILD_DIR ${MONERO_SOURCE_DIR}/build/release/ - CACHE PATH "Path to the build directory for Monero") +if (NOT MONERO_BUILD_DIR) + # set location of monero build tree + set(MONERO_BUILD_DIR ${MONERO_SOURCE_DIR}/build/release/ + CACHE PATH "Path to the build directory for Monero") +endif() set(MY_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The path to the cmake directory of the current project")