From d3438335a2f843ae54705f3da7d40d2bb20c060e Mon Sep 17 00:00:00 2001 From: Stinkfist0 Date: Wed, 30 Dec 2015 16:13:23 +0200 Subject: [PATCH] Work around https://github.com/KhronosGroup/OpenCOLLADA/issues/377 --- win/build-deps.cmd | 5 ++++- win/patches/OpenCOLLADA_CMakeLists.txt.patch | 13 +++++++++++++ win/vs-cfg.cmd | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 win/patches/OpenCOLLADA_CMakeLists.txt.patch diff --git a/win/build-deps.cmd b/win/build-deps.cmd index 284be2b8dd..1887aaf7c5 100644 --- a/win/build-deps.cmd +++ b/win/build-deps.cmd @@ -199,6 +199,10 @@ set DEPENDENCY_DIR=%DEPS_DIR%\OpenCOLLADA call :GitCloneOrPullRepository https://github.com/KhronosGroup/OpenCOLLADA.git "%DEPENDENCY_DIR%" IF NOT %ERRORLEVEL%==0 GOTO :Error cd "%DEPENDENCY_DIR%" +:: Debug build of OpenCOLLADAValidator fails (https://github.com/KhronosGroup/OpenCOLLADA/issues/377) so +:: so disable it from the build altogether as we have no use for it +findstr #add_subdirectory(COLLADAValidator) CMakeLists.txt>NUL +IF NOT %ERRORLEVEL%==0 git apply --reject --whitespace=fix "%~dp0patches\OpenCOLLADA_CMakeLists.txt.patch" :: NOTE OpenCOLLADA has been observed to have problems with switching between debug and release builds so :: uncomment to following line in order to delete the CMakeCache.txt always if experiencing problems. REM IF EXIST "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt". del "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt" @@ -208,7 +212,6 @@ call :RunCMake -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%\OpenCOLLADA" -DUSE_STATIC_M IF NOT %ERRORLEVEL%==0 GOTO :Error REM IF NOT EXIST "%DEPS_DIR%\OpenCOLLADA\%BUILD_DIR%\lib\%DEBUG_OR_RELEASE%\OpenCOLLADASaxFrameworkLoader.lib". call :BuildSolution "%DEPENDENCY_DIR%\%BUILD_DIR%\OPENCOLLADA.sln" %DEBUG_OR_RELEASE% -:: TODO Debug build of OpenCOLLADAValidator as it will fail, https://github.com/KhronosGroup/OpenCOLLADA/issues/377 IF NOT %ERRORLEVEL%==0 GOTO :Error call :InstallCMakeProject "%DEPENDENCY_DIR%\%BUILD_DIR%" %DEBUG_OR_RELEASE% IF NOT %ERRORLEVEL%==0 GOTO :Error diff --git a/win/patches/OpenCOLLADA_CMakeLists.txt.patch b/win/patches/OpenCOLLADA_CMakeLists.txt.patch new file mode 100644 index 0000000000..bdb33edbf4 --- /dev/null +++ b/win/patches/OpenCOLLADA_CMakeLists.txt.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e28557..7549c16 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -271,7 +271,7 @@ add_subdirectory(COLLADASaxFrameworkLoader) + add_subdirectory(COLLADAStreamWriter) + + # building COLLADAValidator app +-add_subdirectory(COLLADAValidator) ++#add_subdirectory(COLLADAValidator) + + + # Library export diff --git a/win/vs-cfg.cmd b/win/vs-cfg.cmd index 21677b9610..cf70bb5265 100644 --- a/win/vs-cfg.cmd +++ b/win/vs-cfg.cmd @@ -156,7 +156,7 @@ IF %BUILD_CFG%==Debug ( :: Add utils to PATH set ORIGINAL_PATH=%PATH% -set PATH=%PATH%;%~dp0\utils +set PATH=%PATH%;%~dp0utils :: Fetch and build the dependencies to a dedicated directory depending on the used VS version and target architecture. :: NOTE For IfcOpenShell we can build all of our deps both x86 and x64 using different VS versions in the same directories