From: Arokux X Date: Thu, 24 Oct 2013 13:53:39 +0000 (+0800) Subject: CMAKE help if cwd not git dir X-Git-Tag: upstream/1.7.3~826 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0b3d13fbf4bd74385d96bc3aedb552780954443;p=platform%2Fupstream%2Flibwebsockets.git CMAKE help if cwd not git dir Hi all, please consider applying the patch below. The git is called in some different directory and that is why fails. I'm not sure why it was called in different directory, maybe because I build libwebsockets with CMake's ExternalProject. Best, Arokux Signed-off-by: Arokux X --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fed8704..35fb7f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'") find_package(Git) if(GIT_EXECUTABLE) execute_process( + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND "${GIT_EXECUTABLE}" log -n 1 --pretty=%h OUTPUT_VARIABLE GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE