From 538b9bc478c5b95f8c011d3f023f7d8670d7e134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 3 Dec 2021 23:10:46 +0100 Subject: [PATCH] Fix link order in MSYS2 build --- src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1f7fe67c0..2bb82ca4e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -159,12 +159,16 @@ target_link_libraries(86Box PNG::PNG) if(VCPKG_TOOLCHAIN) # vcpkg includes a config file for rtmidi - find_package(RtMidi) + find_package(RtMidi REQUIRED) target_link_libraries(86Box RtMidi::rtmidi) else() find_package(PkgConfig REQUIRED) pkg_check_modules(RTMIDI REQUIRED IMPORTED_TARGET rtmidi) target_link_libraries(86Box PkgConfig::RTMIDI) + + if(WIN32) + target_link_libraries(PkgConfig::RTMIDI INTERFACE winmm) + endif() endif() configure_file(include/86box/version.h.in include/86box/version.h @ONLY)