add yaml-cpp

This commit is contained in:
2026-01-23 22:18:47 -06:00
parent 9ca60ced76
commit 60ba371a05
8 changed files with 58 additions and 10 deletions

View File

@@ -7,9 +7,11 @@ $BUILD_DIR = "$PWD/build"
$CONFIG = "Release"
# change these to your need
# or TODO: make qt_root configurable
$QT_ROOT = "C:\Qt\6.10.1\msvc2022_64"
$RTAUDIO_ROOT = "$BUILD_DIR\lib\rtaudio"
$RTMIDI_ROOT = "$BUILD_DIR\lib\rtmidi"
$YAMLCPP_ROOT = "$BUILD_DIR\lib\yaml-cpp"
# setup
@@ -23,7 +25,7 @@ if (-not (Test-Path -Path $BUILD_DIR)) {
# detect dependencies
$libraries = @("rtaudio", "rtmidi")
$libraries = @("rtaudio", "rtmidi", "yaml-cpp")
$dependencies_found = 0
foreach ($lib in $libraries) {
if (Test-Path -Path ".\build\lib\$lib") {
@@ -42,7 +44,13 @@ if (-not ($dependencies_found -eq $libraries.Count)) {
# configure
Write-Host "Configuring metabolus..."
cmake -S . -B $BUILD_DIR -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DQt6_ROOT="$QT_ROOT\lib\cmake\Qt6" -DRtAudio_ROOT="$RTAUDIO_ROOT" -DRtMidi_ROOT="$RTMIDI_ROOT"
cmake -S . -B $BUILD_DIR -G "Visual Studio 17 2022" `
-DCMAKE_BUILD_TYPE=Release `
-DQt6_ROOT="$QT_ROOT\lib\cmake\Qt6" `
-DRtAudio_ROOT="$RTAUDIO_ROOT" `
-DRtMidi_ROOT="$RTMIDI_ROOT" `
-Dyaml-cpp_ROOT="$YAMLCPP_ROOT" `
# build
Write-Host "Building metabolus..."
@@ -56,6 +64,7 @@ cd $BUILD_DIR
Copy-Item -Path "$RTAUDIO_ROOT\bin\rtaudio.dll" -Destination .\Debug
Copy-Item -Path "$RTMIDI_ROOT\bin\rtmidi.dll" -Destination .\Debug
Copy-Item -Path "$YAMLCPP_ROOT\bin\yaml-cpp.dll" -Destination .\Debug
# TODO: allow input of an external qt install because this one is huge

View File

@@ -16,7 +16,6 @@ cmake -S . -B build -G "Visual Studio 17 2022" -DRTDUIO_API_WASAPI=ON -DRTAUDIO_
cmake --build build --config Release
cmake --install build --prefix "$build_lib_dir\rtaudio"
# rtmidi
mkdir "$build_lib_dir\rtmidi" -Force
cd $project_root\lib\rtmidi
@@ -25,9 +24,10 @@ cmake --build build --config Release
cmake --install build --prefix "$build_lib_dir\rtmidi"
# yaml-cpp
<#
cd $project_root\lib\qtbase
#>
mkdir "$build_lib_dir\yaml-cpp" -Force
cd $project_root\lib\yaml-cpp
cmake -S . -B build -G "Visual Studio 17 2022" -DYAML_BUILD_SHARED_LIBS=ON
cmake --build build --config Release
cmake --install build --prefix "$build_lib_dir\yaml-cpp"
cd $project_root