Skip to content

Commit

Permalink
add handy-dandy batch file for mass-build
Browse files Browse the repository at this point in the history
also fix bug in cmake that was somehow syntactically correct (hurr)
  • Loading branch information
Gargaj committed Apr 8, 2017
1 parent 48cea07 commit 8dc5612
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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" $<TARGET_FILE_DIR:${BZC_EXE_NAME}>)
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" $<TARGET_FILE_DIR:${BZC_EXE_NAME}>)
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" $<TARGET_FILE_DIR:${BZC_EXE_NAME}>)
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" $<TARGET_FILE_DIR:${BZC_EXE_NAME}>)
endif ()
endif ()
Expand Down
55 changes: 55 additions & 0 deletions cmake_all.bat
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8dc5612

Please sign in to comment.