OXYGENHUB
◆ rrdc-perf enhanced-x16-emulator / vcpkg-triplets / x86-windows-x16emu.cmake
907 B · last changed chore(): initial commit 26 days ago source blame history raw
1
# Commander X16 Emulator - Windows packaging triplet.
2
#
3
# Link everything statically, including the CRT, so a release is a single
4
# self-contained x16emu.exe with no redistributable to install.
5
#
6
# FluidSynth is the one exception, and has to be. The emulator never links
7
# against it: midi.c loads libfluidsynth-3.dll at runtime with LoadLibrary and
8
# resolves each entry point with GetProcAddress, so MIDI support is whatever
9
# DLL happens to sit beside the executable. A static build would produce a .lib
10
# the emulator can never use, so build it as a DLL and ship that alongside.
11
#
12
# This also suits the licence: FluidSynth is LGPL-2.1-or-later, and loading it
13
# at runtime leaves users free to drop in their own build of it.
14
set(VCPKG_TARGET_ARCHITECTURE x86)
15
set(VCPKG_CRT_LINKAGE static)
16
set(VCPKG_LIBRARY_LINKAGE static)
17
18
if(PORT STREQUAL "fluidsynth")
19
    set(VCPKG_LIBRARY_LINKAGE dynamic)
20
endif()