From bc204d4390483909c7ab6f63cbb5e83f82005742 Mon Sep 17 00:00:00 2001 From: Mollie Munoz Date: Wed, 5 Aug 2020 11:20:32 -0700 Subject: [PATCH] Update dropped changes from sample directory restructure (#985) * PnP to IoT Plug and Play in README.md * Add LNK4098 workaround into CMakeList.txt --- sdk/samples/iot/CMakeLists.txt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sdk/samples/iot/CMakeLists.txt b/sdk/samples/iot/CMakeLists.txt index 5a4f0a9cbf40..916a3dd8c5d4 100644 --- a/sdk/samples/iot/CMakeLists.txt +++ b/sdk/samples/iot/CMakeLists.txt @@ -133,4 +133,20 @@ target_link_libraries(paho_iot_provisioning_sas_sample az::iot::samples::common ) -endif() # TRANSPORT_PAHO +# Workaround for linker warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs +if (MSVC) + set_target_properties( + paho_iot_hub_c2d_sample + paho_iot_hub_methods_sample + paho_iot_hub_pnp_sample + paho_iot_hub_telemetry_sample + paho_iot_hub_sas_telemetry_sample + paho_iot_hub_twin_sample + paho_iot_provisioning_sample + paho_iot_provisioning_sas_sample + PROPERTIES LINK_FLAGS + "/NODEFAULTLIB:libcmtd.lib" + ) +endif() + +endif() # TRANSPORT_PAHO \ No newline at end of file