From 8dc561299ae62aa3ab12943cc4ca1297be33896f Mon Sep 17 00:00:00 2001 From: Gargaj Date: Sat, 8 Apr 2017 13:37:49 +0200 Subject: [PATCH] add handy-dandy batch file for mass-build also fix bug in cmake that was somehow syntactically correct (hurr) --- CMakeLists.txt | 4 ++-- cmake_all.bat | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 cmake_all.bat diff --git a/CMakeLists.txt b/CMakeLists.txt index a7245181..eae8b800 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -454,13 +454,13 @@ target_link_libraries(${BZC_EXE_NAME} ${BZC_PROJECT_LIBS}) if (MSVC) if (BONZOMATIC_64BIT) add_custom_command(TARGET ${BZC_EXE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/external/bass/x64/bass.dll" $) - elseif () + else () add_custom_command(TARGET ${BZC_EXE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/external/bass/x86/bass.dll" $) endif () if (BONZOMATIC_NDI) if (BONZOMATIC_64BIT) add_custom_command(TARGET ${BZC_EXE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "c:/Program Files/NewTek/NewTek NDI SDK/Bin/x64/Processing.NDI.Lib.x64.dll" $) - elseif () + else () add_custom_command(TARGET ${BZC_EXE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "c:/Program Files/NewTek/NewTek NDI SDK/Bin/x86/Processing.NDI.Lib.x86.dll" $) endif () endif () diff --git a/cmake_all.bat b/cmake_all.bat new file mode 100644 index 00000000..f5750e97 --- /dev/null +++ b/cmake_all.bat @@ -0,0 +1,55 @@ +set BNZ_X64=ON +set BNZ_FLAVOR=GLFW +call :build +set BNZ_X64=ON +set BNZ_FLAVOR=DX9 +call :build +set BNZ_X64=ON +set BNZ_FLAVOR=DX11 +call :build + +copy LICENSE _package.x64 +copy README.md _package.x64 + +set BNZ_X64=OFF +set BNZ_FLAVOR=GLFW +call :build +set BNZ_X64=OFF +set BNZ_FLAVOR=DX9 +call :build +set BNZ_X64=OFF +set BNZ_FLAVOR=DX11 +call :build + +copy LICENSE _package.x86 +copy README.md _package.x86 + +goto :eof + +REM --------------------- BUILD TIME ------------------------------- + +:build + +set BNZ_COMPILER=Visual Studio 10 2010 +if not "%BNZ_X64%"=="ON" goto skipme +set BNZ_COMPILER=Visual Studio 10 2010 Win64 +:skipme + +set BNZ_OUT_DIR=x86 +set BNZ_PLATFORM=W32 +if not "%BNZ_X64%"=="ON" goto skipme +set BNZ_OUT_DIR=x64 +set BNZ_PLATFORM=W64 +:skipme + +mkdir build.%BNZ_OUT_DIR%.%BNZ_FLAVOR% +cd build.%BNZ_OUT_DIR%.%BNZ_FLAVOR% +cmake -DBONZOMATIC_NDI="ON" -DBONZOMATIC_64BIT="%BNZ_X64%" -DBONZOMATIC_WINDOWS_FLAVOR:STRING="%BNZ_FLAVOR%" -G "%BNZ_COMPILER%" ../ +cmake --build . --config Release +mkdir ..\_package.%BNZ_OUT_DIR%\ +del ..\_package.%BNZ_OUT_DIR%\Bonzomatic_%BNZ_PLATFORM%_%BNZ_FLAVOR%.exe +copy .\Release\Bonzomatic.exe ..\_package.%BNZ_OUT_DIR%\Bonzomatic_%BNZ_PLATFORM%_%BNZ_FLAVOR%.exe +copy .\Release\bass.dll ..\_package.%BNZ_OUT_DIR%\ +copy .\Release\Processing.NDI.Lib.%BNZ_OUT_DIR%.dll ..\_package.%BNZ_OUT_DIR%\ +cd .. +goto :eof