mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 11:40:22 +00:00
Since we must now build the new libajantv2, which takes some 3 minutes, cache the build in order not to increase the build time. Also use libajantv2 path for the SDK instead of AJA (doesn't require unneeded rename), which will be Windows specific. Only do it in MSW, since the build is slowest. But it can be easily used also for other platforms.
54 lines
1.6 KiB
Bash
Executable File
54 lines
1.6 KiB
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
#export PATH='/usr/local/bin:/usr/bin:/bin'
|
|
|
|
function run_in_vs_env
|
|
{
|
|
eval vssetup=\$"$1"'\\..\\..\\VC\\bin\\amd64\\vcvars64.bat'
|
|
cmd //Q //C call "${vssetup?vssetup not set!}" "&&" "${@:2}"
|
|
}
|
|
|
|
function run_vs16
|
|
{
|
|
eval vssetup='C:\\Program\ Files\ \(x86\)\\Microsoft\ Visual\ Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat'
|
|
cmd //Q //C call "${vssetup?vssetup not set!}" "&&" "$@"
|
|
}
|
|
|
|
function run_vs12
|
|
{
|
|
run_in_vs_env VS120COMNTOOLS "$@"
|
|
}
|
|
|
|
|
|
function run_vs11
|
|
{
|
|
run_in_vs_env VS110COMNTOOLS "$@"
|
|
}
|
|
|
|
function run_vs10
|
|
{
|
|
run_in_vs_env VS100COMNTOOLS "$@"
|
|
}
|
|
|
|
# shellcheck disable=SC2016
|
|
export INCLUDE='src;libajantv2;libajantv2\ajantv2\includes;libajantv2\ajantv2\src\win'
|
|
|
|
# rename both aja.cpp because msvc creates object aja.obj for both in the same directory
|
|
cp src/video_capture/aja.cpp aja_capture.cpp
|
|
cp src/video_display/aja.cpp aja_display.cpp
|
|
|
|
MSVS_PATH=$(/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/Installer/vswhere.exe -latest -property installationPath)
|
|
|
|
eval vssetup=\""$MSVS_PATH"\"'\\VC\\Auxiliary\\Build\\vcvars64.bat'
|
|
cmd //Q //C call "$vssetup" "&&" cl //std:c++latest //EHsc //LD //D_XKEYCHECK_H \
|
|
//DAJA_WINDOWS //DMSWindows //DAJA_NTV2SDK_VERSION_MAJOR=13 \
|
|
src/aja_common.cpp aja_capture.cpp aja_display.cpp \
|
|
src/video_capture/aja_win32_utils.cpp src/video_capture_params.cpp \
|
|
src/utils/config_file.cpp src/utils/video_frame_pool.cpp \
|
|
libajantv2/build/ajantv2/Release/ajantv2.lib advapi32.lib Netapi32.lib \
|
|
Shell32.lib Shlwapi.lib user32.lib winmm.lib //Feaja
|
|
|
|
cp aja.lib /usr/local/lib
|
|
cp aja.dll /usr/local/bin
|
|
|