mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
12 lines
306 B
CMake
12 lines
306 B
CMake
execute_process(
|
|
COMMAND git log -1 --format=%h
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
OUTPUT_VARIABLE COMMIT_SHA
|
|
RESULT_VARIABLE GIT_RETURN
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
|
|
if (${GIT_RETURN} EQUAL "0")
|
|
set(PROJECT_COMMIT_SHA "${COMMIT_SHA}")
|
|
endif ()
|