From b5afd00ad632ab144555e9bc1e106b84e11cd040 Mon Sep 17 00:00:00 2001 From: Andrew Male Date: Sat, 11 Nov 2017 07:27:31 -0500 Subject: Modifying libwebsockets portfile to account for static triplets --- ports/libwebsockets/portfile.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index 43502a52a..fa5ecfd8f 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -17,10 +17,19 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch ) +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(LWS_MSVC_STATIC_RUNTIME ON) + set(LWS_MSVC_SHARED_RUNTIME OFF) +else() + set(LWS_MSVC_STATIC_RUNTIME OFF) + set(LWS_MSVC_SHARED_RUNTIME ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DLWS_WITH_STATIC=OFF + -DLWS_WITH_STATIC=${LWS_MSVC_STATIC_RUNTIME} + -DLWS_WITH_SHARED=${LWS_MSVC_SHARED_RUNTIME} -DLWS_USE_BUNDLED_ZLIB=OFF -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON -- cgit v1.2.3