diff options
| author | Jackie Ng <jumpinjackie@gmail.com> | 2017-05-11 02:36:12 +1000 |
|---|---|---|
| committer | Jackie Ng <jumpinjackie@gmail.com> | 2017-05-11 02:36:12 +1000 |
| commit | eb1b6c97feabf0150015192dc649a70934d9c9df (patch) | |
| tree | bd568e7c1456e15e5534d9a0a492955756838f3c /ports/cppunit | |
| parent | c9c9d2952597e339166b43e83634b78dc8618a7c (diff) | |
| download | vcpkg-eb1b6c97feabf0150015192dc649a70934d9c9df.tar.gz vcpkg-eb1b6c97feabf0150015192dc649a70934d9c9df.zip | |
[cppunit]: Apply the static CRT linkage patch only if static CRT linkage was specified
Diffstat (limited to 'ports/cppunit')
| -rw-r--r-- | ports/cppunit/portfile.cmake | 15 |
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") |
