From 2f00f87e8e058f276ccf8900f678b5afd2922ee6 Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Wed, 22 May 2013 23:34:02 +1200 Subject: [PATCH] Use working directory for executions. Fixes issue 6318 --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ddf6c1581..ecc8e6ea61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,11 +85,11 @@ endfunction(enable_precompiled_headers) include(FindGit OPTIONAL) if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION) # defines DOLPHIN_WC_REVISION - EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD + EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD OUTPUT_VARIABLE DOLPHIN_WC_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE) # defines DOLPHIN_WC_DESCRIBE - EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty + EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE) @@ -97,7 +97,7 @@ if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION) STRING(REGEX REPLACE "-[^-]+((-dirty)?)$" "\\1" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}") # defines DOLPHIN_WC_BRANCH - EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE DOLPHIN_WC_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE) endif() @@ -604,7 +604,7 @@ if(NOT DISABLE_WX AND NOT ANDROID) FIND_PACKAGE(wxWidgets COMPONENTS core aui adv) if(wxWidgets_FOUND) - EXECUTE_PROCESS( + EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" ${wxWidgets_CONFIG_OPTIONS} --version OUTPUT_VARIABLE wxWidgets_VERSION @@ -619,7 +619,7 @@ if(NOT DISABLE_WX AND NOT ANDROID) endif(wxWidgets_FOUND) if(wxWidgets_FOUND) - EXECUTE_PROCESS( + EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" ${wxWidgets_CONFIG_OPTIONS} --version OUTPUT_VARIABLE wxWidgets_VERSION