aboutsummaryrefslogtreecommitdiff
path: root/ports/azure-iot-sdk-c/improve-external-deps.patch
blob: d96e0fe38668b60d1a63e0ce872bb6c21b2ca3bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
diff --git a/configs/azure_iot_sdksConfig.cmake b/configs/azure_iot_sdksConfig.cmake
index b9c62e8..edf5847 100644
--- a/configs/azure_iot_sdksConfig.cmake
+++ b/configs/azure_iot_sdksConfig.cmake
@@ -1,5 +1,10 @@
 #Copyright (c) Microsoft. All rights reserved.
 #Licensed under the MIT license. See LICENSE file in the project root for full license information.
+include(CMakeFindDependencyMacro)
+find_dependency(unofficial-parson)
+find_dependency(uamqp)
+find_dependency(umqtt)
+find_dependency(azure_c_shared_utility)
 
 include("${CMAKE_CURRENT_LIST_DIR}/azure_iot_sdksTargets.cmake")
 
diff --git a/dependencies.cmake b/dependencies.cmake
index 063733a..71bfc7d 100644
--- a/dependencies.cmake
+++ b/dependencies.cmake
@@ -18,6 +18,8 @@ if(${use_installed_dependencies})
         endif()
     endif()	
 
+    find_package(unofficial-parson REQUIRED)
+    link_libraries(unofficial::parson::parson)
 else()
     add_subdirectory(c-utility)
 
diff --git a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt
index 161872a..d53e111 100644
--- a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt
+++ b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt
@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files
 
 set(${theseTestsName}_c_files
     ../../../certs/certs.c
-    ../../../deps/parson/parson.c
 )
 
 set(${theseTestsName}_h_files
     ../../../certs/certs.h
-    ../../../deps/parson/parson.h
     ../common_dt_e2e/iothubclient_common_dt_e2e.h
 )
 
diff --git a/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt
index d472161..b0291e8 100644
--- a/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt
+++ b/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt
@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files
 
 set(${theseTestsName}_c_files
     ../../../certs/certs.c
-    ../../../deps/parson/parson.c
 )
 
 set(${theseTestsName}_h_files
     ../../../certs/certs.h
-    ../../../deps/parson/parson.h
     ../common_dt_e2e/iothubclient_common_dt_e2e.h
 )
 
diff --git a/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt b/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt
index d05d654..5872c8d 100644
--- a/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt
+++ b/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt
@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files
 
 set(${theseTestsName}_c_files
     ../../../certs/certs.c
-    ../../../deps/parson/parson.c
 )
 
 set(${theseTestsName}_h_files
     ../../../certs/certs.h
-    ../../../deps/parson/parson.h
     ../common_dt_e2e/iothubclient_common_dt_e2e.h
 )
 
diff --git a/iothub_service_client/CMakeLists.txt b/iothub_service_client/CMakeLists.txt
index 11a9a9a..4097293 100644
--- a/iothub_service_client/CMakeLists.txt
+++ b/iothub_service_client/CMakeLists.txt
@@ -72,9 +72,7 @@ endif()
 setSdkTargetBuildProperties(iothub_service_client)
 
 if(NOT ${nuget_e2e_tests})
-    target_link_libraries(iothub_service_client uamqp parson)
-else()
-    target_link_libraries(iothub_service_client parson)
+    target_link_libraries(iothub_service_client uamqp)
 endif()
 
 if (NOT ${ARCHITECTURE} STREQUAL "ARM")