From afd53e050803a3c0e9d812ae13ab1c5a4c526a34 Mon Sep 17 00:00:00 2001 From: Vedant Paranjape <22630228+VedantParanjape@users.noreply.github.com> Date: Sat, 14 Nov 2020 19:30:38 +0530 Subject: [PATCH] Compilation failed if ftxui was used in projects that were not git repositories. Since, in CMakeLists.txt working directory to execute command was (#61) set as the parent directory and not the FTXUI project directory. * Changed the working directory variable to ${CMAKE_CURRENT_SOURCE_DIR}, so as to get the version of FTXUI and not that of parent project --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aaab4b8f..1b891926 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) execute_process( COMMAND git rev-list --count HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE git_version OUTPUT_STRIP_TRAILING_WHITESPACE )