We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 250e772 commit 4335e70Copy full SHA for 4335e70
CMakeLists.txt
@@ -12,9 +12,13 @@ add_compile_definitions(PROJECT_VERSION_STRING="${PROJECT_VERSION_STRING}")
12
project(ImStudio C CXX)
13
14
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
15
-include(GetGitRevisionDescription)
16
-get_git_head_revision(GIT_REFSPEC GIT_SHA1)
17
-add_compile_definitions(GIT_SHA1="${GIT_SHA1}")
+
+find_package(Git)
+if(Git_FOUND)
18
+ include(GetGitRevisionDescription)
19
+ get_git_head_revision(GIT_REFSPEC GIT_SHA1)
20
+ add_compile_definitions(GIT_SHA1="${GIT_SHA1}")
21
+endif()
22
23
if (WIN32 OR APPLE)
24
include(glfw)
0 commit comments