3D Slicer Release Build Error (Variable Slicer_WC_LAST_CHANGED_DATE is expected to be defined in SlicerPackageAndUploadTarget)

Hi,
I receive this error when I try to build extensions using Cmake.

– Found Git: C:/Program Files/Git/cmd/git.exe
– Looking for decorator header qSlicerOHModuleModuleWidgetsPythonQtDecorators.h
– Looking for decorator header qSlicerOHModuleModuleWidgetsPythonQtDecorators.h - Not found
– Configuring Loadable module: OHModule [qSlicerOHModuleModuleExport.h]
CMake Warning (dev) at C:/D/S4/CMake/SlicerMacroExtractRepositoryInfo.cmake:75 (message):
Skipping repository info extraction: directory [C:/dev/OHExtension/OH] is
not a GIT or SVN checkout
Call Stack (most recent call first):
C:/D/S4/CMake/SlicerExtensionCPack.cmake:60 (SlicerMacroExtractRepositoryInfo)
CMakeLists.txt:27 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at C:/D/S4/Extensions/CMake/SlicerFunctionGenerateExtensionDescription.cmake:70 (message):
CMake variable EXTENSION_WC_REVISION is empty !
Call Stack (most recent call first):
C:/D/S4/CMake/SlicerExtensionCPack.cmake:79 (slicerFunctionGenerateExtensionDescription)
CMakeLists.txt:27 (include)

– Configuring incomplete, errors occurred!
See also “C:/dev/OHExtension/OHBuild/CMakeFiles/CMakeOutput.log”.
See also “C:/dev/OHExtension/OHBuild/CMakeFiles/CMakeError.log”.

I moved this issue here seeing that it is still the issue with extracting revision of the working copy. However, it might be a slightly different issue. How did you create the C:/dev/OHExtension/OH folder folder? What revision control do you use for developing the extension?

If you are not using revision control then you can specify working copy version CMake variables manually when you configure your project, either using the CMake GUI or by adding these arguments when you call cmake.exe:

-DYourExtensionName_WC_REVISION:STRING=100 -DEXTENSION_WC_REVISION:STRING=100

(replace YourExtensionName and 100 with the actual name of your extension and a revision number)

also C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: “D:\T\R\CMakeFiles\44934091396c3b054b003113a65e021b\Slicer-configure.rule;D:\T\R\CMakeFiles\44934091396c3b054b003113a65e021b\Slicer-build.rule;D:\T\R\CMakeFiles\44934091396c3b054b003113a65e021b\Slicer-forceconfigure.rule;D:\T\R\CMakeFiles\44934091396c3b054b003113a65e021b\Slicer-install.rule;D:\T\R\CMakeFiles\8d7bfc65e5c95651d8140dc57a2140ef\Slicer-complete.rule;D:\T\R\CMakeFiles\2b07ec81edd0d1d54d3567e2f1beb78f\Slicer.rule” exited with code 1。