Skip to content

Commit

Permalink
make windows rtmidi.lib build consistent for Release with others
Browse files Browse the repository at this point in the history
It still fails to build locally due to `jnirtmidi.obj : error LNK2001: unresolved external symbol _rtmidi_in_create_default` etc. but might be different on CI...
  • Loading branch information
atsushieno authored Feb 22, 2024
1 parent 79943ec commit 7b75ee1
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions rtmidi-javacpp/build.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

New-Item -ItemType Directory -Force -Path "build\$Env:PLATFORM"
Set-Location "build\$Env:PLATFORM"
$PLATFORM = $Env:PLATFORM
New-Item -ItemType Directory -Force -Path "build\$PLATFORM"
Set-Location "build\$PLATFORM"

$DIST = (Get-Location).Path

Expand All @@ -17,12 +18,12 @@ if (-not (Test-Path .patch.stamp)) {
patch -i $ScriptDir\..\workaround-javacpp-code-generator-issue.patch -p1
New-Item -ItemType File -Name .patch.stamp
}
cmake -B "build-$PLATFORM" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=false -G Ninja
cmake --build "build-$PLATFORM"

#cmake --install "build-$PLATFORM" --prefix $DIST
New-Item -ItemType Directory -Path "$DIST\include\rtmidi" -Force
New-Item -ItemType Directory -Path "$DIST\lib" -Force
Copy "*.h" "$DIST\include\rtmidi"
Copy "build-$PLATFORM\Debug\rtmidi.*" "$DIST\lib"
cmake -B "build-$PLATFORM"
cmake --build "build-$PLATFORM" --config Release

cmake --install "build-$PLATFORM" --prefix $DIST
#New-Item -ItemType Directory -Path "$DIST\include\rtmidi" -Force
#New-Item -ItemType Directory -Path "$DIST\lib" -Force
#Copy "*.h" "$DIST\include\rtmidi"
#Copy "build-$PLATFORM\Debug\*" "$DIST\lib"

0 comments on commit 7b75ee1

Please sign in to comment.