From 63f8942d245a9b5e0c8646993e89daf5d3986b62 Mon Sep 17 00:00:00 2001 From: JoergAtGithub Date: Sat, 15 Oct 2022 08:36:20 +0200 Subject: [PATCH] Set new PortMIDI CMake variable for static CRT builds --- ports/portmidi/portfile.cmake | 12 +++++++++++- versions/p-/portmidi.json | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ports/portmidi/portfile.cmake b/ports/portmidi/portfile.cmake index fc104963ea459a..f6e8fe35214892 100644 --- a/ports/portmidi/portfile.cmake +++ b/ports/portmidi/portfile.cmake @@ -6,7 +6,17 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +if(VCPKG_CRT_LINKAGE STREQUAL static) + SET(PM_USE_STATIC_RUNTIME ON) +else() + SET(PM_USE_STATIC_RUNTIME OFF) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DPM_USE_STATIC_RUNTIME="${PM_USE_STATIC_RUNTIME}" +) vcpkg_cmake_install() vcpkg_fixup_pkgconfig() diff --git a/versions/p-/portmidi.json b/versions/p-/portmidi.json index d2c8af68c3633d..012eabc37bf080 100644 --- a/versions/p-/portmidi.json +++ b/versions/p-/portmidi.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cef230927926bae09c39f67c62b1ad1380a99aed", + "git-tree": "80e9d16ce38c591b483a1d5b84eeb96a00a4d4ff", "version": "2.0.4", "port-version": 0 },