Skip to content

Commit 8dc5612

Browse files
committed
add handy-dandy batch file for mass-build
also fix bug in cmake that was somehow syntactically correct (hurr)
1 parent 48cea07 commit 8dc5612

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,13 @@ target_link_libraries(${BZC_EXE_NAME} ${BZC_PROJECT_LIBS})
454454
if (MSVC)
455455
if (BONZOMATIC_64BIT)
456456
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}>)
457-
elseif ()
457+
else ()
458458
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}>)
459459
endif ()
460460
if (BONZOMATIC_NDI)
461461
if (BONZOMATIC_64BIT)
462462
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}>)
463-
elseif ()
463+
else ()
464464
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}>)
465465
endif ()
466466
endif ()

cmake_all.bat

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
set BNZ_X64=ON
2+
set BNZ_FLAVOR=GLFW
3+
call :build
4+
set BNZ_X64=ON
5+
set BNZ_FLAVOR=DX9
6+
call :build
7+
set BNZ_X64=ON
8+
set BNZ_FLAVOR=DX11
9+
call :build
10+
11+
copy LICENSE _package.x64
12+
copy README.md _package.x64
13+
14+
set BNZ_X64=OFF
15+
set BNZ_FLAVOR=GLFW
16+
call :build
17+
set BNZ_X64=OFF
18+
set BNZ_FLAVOR=DX9
19+
call :build
20+
set BNZ_X64=OFF
21+
set BNZ_FLAVOR=DX11
22+
call :build
23+
24+
copy LICENSE _package.x86
25+
copy README.md _package.x86
26+
27+
goto :eof
28+
29+
REM --------------------- BUILD TIME -------------------------------
30+
31+
:build
32+
33+
set BNZ_COMPILER=Visual Studio 10 2010
34+
if not "%BNZ_X64%"=="ON" goto skipme
35+
set BNZ_COMPILER=Visual Studio 10 2010 Win64
36+
:skipme
37+
38+
set BNZ_OUT_DIR=x86
39+
set BNZ_PLATFORM=W32
40+
if not "%BNZ_X64%"=="ON" goto skipme
41+
set BNZ_OUT_DIR=x64
42+
set BNZ_PLATFORM=W64
43+
:skipme
44+
45+
mkdir build.%BNZ_OUT_DIR%.%BNZ_FLAVOR%
46+
cd build.%BNZ_OUT_DIR%.%BNZ_FLAVOR%
47+
cmake -DBONZOMATIC_NDI="ON" -DBONZOMATIC_64BIT="%BNZ_X64%" -DBONZOMATIC_WINDOWS_FLAVOR:STRING="%BNZ_FLAVOR%" -G "%BNZ_COMPILER%" ../
48+
cmake --build . --config Release
49+
mkdir ..\_package.%BNZ_OUT_DIR%\
50+
del ..\_package.%BNZ_OUT_DIR%\Bonzomatic_%BNZ_PLATFORM%_%BNZ_FLAVOR%.exe
51+
copy .\Release\Bonzomatic.exe ..\_package.%BNZ_OUT_DIR%\Bonzomatic_%BNZ_PLATFORM%_%BNZ_FLAVOR%.exe
52+
copy .\Release\bass.dll ..\_package.%BNZ_OUT_DIR%\
53+
copy .\Release\Processing.NDI.Lib.%BNZ_OUT_DIR%.dll ..\_package.%BNZ_OUT_DIR%\
54+
cd ..
55+
goto :eof

0 commit comments

Comments
 (0)