aboutsummaryrefslogtreecommitdiff
path: root/ports/cppunit
diff options
context:
space:
mode:
Diffstat (limited to 'ports/cppunit')
-rw-r--r--ports/cppunit/portfile.cmake15
1 files changed, 8 insertions, 7 deletions
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")