I am having trouble building SlicerCustomAppTemplate while I am not encountering any errors when building the latest version of Slicer.
Here is my configuration:
Windows 11
Cmake 3.22.4
Qt 5.15.2
Visual Studio 2022
As defined here, I downloaded the source folder of SlicerCustomAppTemplate via : pip install cookiecutter jinja2-github cookiecutter gh:KitwareMedical/SlicerCustomAppTemplate
Here I do not change anything in the source folder.
Have a look at the first error. All the other may be consequences of the first one.
As I see, this is the first error:
14> Syntax error in cmake code at
14>
14> C:/D/S5D/slicersources-build/CTKAppLauncherLib-prefix/tmp/CTKAppLauncherLib-cache-Debug.cmake:19
14>
14> when parsing string
14>
14> C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5
14>
14> Invalid escape sequence \Q
It means that somewhere you specified Qt path using Windows separators () instead of cross-platform separators (/). The backslash was interpreted somewhere as escape character, which caused the build error.
Try using C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5 as Qt path.
This was tentatively addressed in Slicer@d4723511c integrated through PR-6790, as we are also experiencing a similar error in a custom application when doing a clean build, I am looking into this.