You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Note that this does *not* include the update to the module rules that would put this new set of libraries into use with engine builds. That will be done in a subsequent change, since it will have to be combined with a rebuild of USD, which is a consumer of the MaterialX libraries. #jira UE-161148 #rb daniel.coelho #preflight skip [CL 21464595 by matt johnson in ue5-main branch]
65 lines
1.8 KiB
Batchfile
Executable File
65 lines
1.8 KiB
Batchfile
Executable File
@echo off
|
|
setlocal
|
|
|
|
set MATERIALX_VERSION=1.38.5
|
|
|
|
rem Set as VS2015 for backwards compatibility even though VS2019 is used
|
|
rem when building.
|
|
set COMPILER_VERSION_NAME=VS2015
|
|
set ARCH_NAME=x64
|
|
|
|
set UE_MODULE_LOCATION=%cd%
|
|
|
|
set SOURCE_LOCATION=%UE_MODULE_LOCATION%\MaterialX-%MATERIALX_VERSION%
|
|
|
|
set BUILD_LOCATION=%UE_MODULE_LOCATION%\Intermediate
|
|
|
|
set INSTALL_INCLUDEDIR=include
|
|
set INSTALL_LIB_DIR=%COMPILER_VERSION_NAME%\%ARCH_NAME%\lib
|
|
|
|
set INSTALL_LOCATION=%UE_MODULE_LOCATION%\Deploy\MaterialX-%MATERIALX_VERSION%
|
|
set INSTALL_INCLUDE_LOCATION=%INSTALL_LOCATION%\%INSTALL_INCLUDEDIR%
|
|
set INSTALL_WIN_LOCATION=%INSTALL_LOCATION%\%COMPILER_VERSION_NAME%
|
|
|
|
if exist %BUILD_LOCATION% (
|
|
rmdir %BUILD_LOCATION% /S /Q)
|
|
if exist %INSTALL_INCLUDE_LOCATION% (
|
|
rmdir %INSTALL_INCLUDE_LOCATION% /S /Q)
|
|
if exist %INSTALL_WIN_LOCATION% (
|
|
rmdir %INSTALL_WIN_LOCATION% /S /Q)
|
|
|
|
mkdir %BUILD_LOCATION%
|
|
pushd %BUILD_LOCATION%
|
|
|
|
echo Configuring build for MaterialX version %MATERIALX_VERSION%...
|
|
cmake -G "Visual Studio 16 2019" %SOURCE_LOCATION%^
|
|
-DCMAKE_INSTALL_PREFIX="%INSTALL_LOCATION%"^
|
|
-DMATERIALX_INSTALL_INCLUDE_PATH="%INSTALL_INCLUDEDIR%"^
|
|
-DMATERIALX_INSTALL_LIB_PATH="%INSTALL_LIB_DIR%"^
|
|
-DMATERIALX_BUILD_TESTS=OFF^
|
|
-DMATERIALX_TEST_RENDER=OFF^
|
|
-DCMAKE_DEBUG_POSTFIX=_d
|
|
if %errorlevel% neq 0 exit /B %errorlevel%
|
|
|
|
echo Building MaterialX for Debug...
|
|
cmake --build . --config Debug -j8
|
|
if %errorlevel% neq 0 exit /B %errorlevel%
|
|
|
|
echo Installing MaterialX for Debug...
|
|
cmake --install . --config Debug
|
|
if %errorlevel% neq 0 exit /B %errorlevel%
|
|
|
|
echo Building MaterialX for Release...
|
|
cmake --build . --config Release -j8
|
|
if %errorlevel% neq 0 exit /B %errorlevel%
|
|
|
|
echo Installing MaterialX for Release...
|
|
cmake --install . --config Release
|
|
if %errorlevel% neq 0 exit /B %errorlevel%
|
|
|
|
popd
|
|
|
|
echo Done.
|
|
|
|
endlocal
|