Skip to content

Commit

Permalink
Use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR for project …
Browse files Browse the repository at this point in the history
…bound version string
  • Loading branch information
Jerin Philip committed Jun 8, 2021
1 parent ad92307 commit 6087379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/GetVersionFromFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif()

# Get current commit SHA from git
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_VERSION_GIT_SHA
OUTPUT_STRIP_TRAILING_WHITESPACE)

Expand Down

0 comments on commit 6087379

Please sign in to comment.