File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,15 @@ if "%INTEL_OPENVINO_DIR%"=="" (
4343
4444if exist " %SAMPLES_BUILD_DIR% \CMakeCache.txt" del " %SAMPLES_BUILD_DIR% \CMakeCache.txt"
4545
46- cd /d " %SAMPLES_SOURCE_DIR% " && cmake -E make_directory " %SAMPLES_BUILD_DIR% " && cd /d " %SAMPLES_BUILD_DIR% " && cmake -DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=ON " %SAMPLES_SOURCE_DIR% "
46+ @ REM %SAMPLES_SOURCE_DIR% ends with a backslash. \ escapes
47+ @ REM the closing quote in "%SAMPLES_SOURCE_DIR%", causing CMake 4.0+ to treat the
48+ @ REM escaped quote as a literal character and produce an invalid path.
49+ @ REM Appending \. prevents the trailing \ from escaping the quote, while still
50+ @ REM referring to the same directory. Without this, CMake reports the error:
51+ @ REM CMake Error: The source directory "< prefix> /samples/cpp"" does not exist.
52+ @ REM
53+ @ REM Note: `cmake --build "%SAMPLES_BUILD_DIR%"` does not suffer from this issue.
54+ cd /d " %SAMPLES_SOURCE_DIR% " && cmake -E make_directory " %SAMPLES_BUILD_DIR% " && cd /d " %SAMPLES_BUILD_DIR% " && cmake -DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=ON " %SAMPLES_SOURCE_DIR% \."
4755if ERRORLEVEL 1 GOTO errorHandling
4856
4957echo .
You can’t perform that action at this time.
0 commit comments