diff --git a/core/cmake/templates/gitscript.cmake.in b/core/cmake/templates/gitscript.cmake.in index 09e9e16841..f2e32fe691 100644 --- a/core/cmake/templates/gitscript.cmake.in +++ b/core/cmake/templates/gitscript.cmake.in @@ -1,33 +1,33 @@ # # Copyright (c) 2010-2020 by Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # set(CMAKE_BACKWARDS_COMPATIBILITY "2.4") # See if we have git installed find_program(GITEXEC git) # Read the version if installed, else set to "unknown" if(GITEXEC) - execute_process(COMMAND ${GITEXEC} --git-dir="@CMAKE_CURRENT_SOURCE_DIR@/../.git" rev-parse HEAD OUTPUT_VARIABLE MYVERSION) + execute_process(COMMAND ${GITEXEC} "--git-dir=@CMAKE_CURRENT_SOURCE_DIR@/../.git" rev-parse HEAD OUTPUT_VARIABLE MYVERSION) if(MYVERSION) # Remove the newline that git returns string(STRIP ${MYVERSION} MYVERSION) endif() else() set(MYVERSION unknown) endif() # Configure the revision header configure_file("@CMAKE_CURRENT_SOURCE_DIR@/cmake/templates/gitversion.h.cmake.in" "@CMAKE_CURRENT_BINARY_DIR@/app/utils/gitversion.h")