From eb1b6c97feabf0150015192dc649a70934d9c9df Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Thu, 11 May 2017 02:36:12 +1000 Subject: [cppunit]: Apply the static CRT linkage patch only if static CRT linkage was specified --- ports/cppunit/portfile.cmake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'ports/cppunit') diff --git a/ports/cppunit/portfile.cmake b/ports/cppunit/portfile.cmake index a7bf2ed75..1f0766d90 100644 --- a/ports/cppunit/portfile.cmake +++ b/ports/cppunit/portfile.cmake @@ -19,13 +19,14 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - # Make sure cppunit static lib uses static CRT linkage - ${CMAKE_CURRENT_LIST_DIR}/0001-static-crt-linkage.patch -) - +if (VCPKG_CRT_LINKAGE STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + # Make sure cppunit static lib uses static CRT linkage + ${CMAKE_CURRENT_LIST_DIR}/0001-static-crt-linkage.patch + ) +endif() if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(BUILD_ARCH "Win32") -- cgit v1.2.3