From ea61ed1aaaae0f716e41b60fff548ae1d174c8c5 Mon Sep 17 00:00:00 2001 From: gsemaj Date: Fri, 15 Jul 2022 22:17:59 -0700 Subject: [PATCH] Handle case where cmake is invoked outside root --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74c1098..039cb4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,8 @@ project(OpenFusion) set(CMAKE_CXX_STANDARD 17) -execute_process(COMMAND git describe --tags OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND git describe --tags OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) # OpenFusion supports multiple packet/struct versions # 104 is the default version to build which can be changed