summaryrefslogtreecommitdiffstats
path: root/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Skip-building-RapidJSON.patch
blob: 699f2be8bb0d339359c2c1e983976ca31d46e388 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
From 589e2395d189209aa509c31b844dd3a34b907b55 Mon Sep 17 00:00:00 2001
From: Scott Ware <scott.r.ware@intel.com>
Date: Fri, 8 Dec 2017 10:55:57 +0000
Subject: [PATCH 5/5] Skip building RapidJSON

Signed-off-by: Scott Ware <scott.r.ware@intel.com>
---
 CMakeLists.txt                       | 9 ++-------
 cli/CMakeLists.txt                   | 1 -
 samples/Discovery/CMakeLists.txt     | 1 -
 samples/PubSub/CMakeLists.txt        | 1 -
 samples/ShadowDelta/CMakeLists.txt   | 1 -
 samples/StoryRobotArm/CMakeLists.txt | 1 -
 samples/StorySwitch/CMakeLists.txt   | 1 -
 7 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa98c30..128cb46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,13 +58,8 @@ else()
     add_library(${SDK_TARGET_NAME} "")
 endif()
 
-# Download and include rapidjson, not optional
-configure_file(CMakeLists-rapidjson.txt.in ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/download/CMakeLists.txt)
-execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
-    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/download)
-execute_process(COMMAND ${CMAKE_COMMAND} --build .
-    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/download)
-target_include_directories(${SDK_TARGET_NAME} PRIVATE ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src/include)
+# Include rapidjson, not optional
+find_package(RapidJSON REQUIRED)
 
 # Download sanitizers, optional
 if (SANITIZE_THREAD OR SANITIZE_ADDRESS OR SANITIZE_MEMORY OR SANITIZE_UNDEFINED)
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
index dfa5040..d8c4308 100644
--- a/cli/CMakeLists.txt
+++ b/cli/CMakeLists.txt
@@ -48,7 +48,6 @@ target_include_directories(${CLI_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../cl
 find_package(Threads REQUIRED)
 
 # Add SDK includes
-target_include_directories(${CLI_TARGET_NAME} PUBLIC ${CMAKE_BINARY_DIR}/third_party/rapidjson/src/include)
 target_include_directories(${CLI_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../include)
 
 target_link_libraries(${CLI_TARGET_NAME} PUBLIC "Threads::Threads")
diff --git a/samples/Discovery/CMakeLists.txt b/samples/Discovery/CMakeLists.txt
index 3147841..cbeac4a 100644
--- a/samples/Discovery/CMakeLists.txt
+++ b/samples/Discovery/CMakeLists.txt
@@ -52,7 +52,6 @@ target_include_directories(${DISCOVERY_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOUR
 find_package(Threads REQUIRED)
 
 # Add SDK includes
-target_include_directories(${DISCOVERY_SAMPLE_TARGET_NAME} PUBLIC ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src/include)
 target_include_directories(${DISCOVERY_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../../include)
 
 target_link_libraries(${DISCOVERY_SAMPLE_TARGET_NAME} PUBLIC "Threads::Threads")
diff --git a/samples/PubSub/CMakeLists.txt b/samples/PubSub/CMakeLists.txt
index 33531d0..8a806b1 100644
--- a/samples/PubSub/CMakeLists.txt
+++ b/samples/PubSub/CMakeLists.txt
@@ -47,7 +47,6 @@ target_include_directories(${PUB_SUB_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOURCE
 find_package(Threads REQUIRED)
 
 # Add SDK includes
-target_include_directories(${PUB_SUB_SAMPLE_TARGET_NAME} PUBLIC ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src/include)
 target_include_directories(${PUB_SUB_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../../include)
 
 target_link_libraries(${PUB_SUB_SAMPLE_TARGET_NAME} PUBLIC "Threads::Threads")
diff --git a/samples/ShadowDelta/CMakeLists.txt b/samples/ShadowDelta/CMakeLists.txt
index 1ebabed..7b941b3 100644
--- a/samples/ShadowDelta/CMakeLists.txt
+++ b/samples/ShadowDelta/CMakeLists.txt
@@ -47,7 +47,6 @@ target_include_directories(${SHADOW_DELTA_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_S
 find_package(Threads REQUIRED)
 
 # Add SDK includes
-target_include_directories(${SHADOW_DELTA_SAMPLE_TARGET_NAME} PUBLIC ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src/include)
 target_include_directories(${SHADOW_DELTA_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../../include)
 
 target_link_libraries(${SHADOW_DELTA_SAMPLE_TARGET_NAME} PUBLIC "Threads::Threads")
diff --git a/samples/StoryRobotArm/CMakeLists.txt b/samples/StoryRobotArm/CMakeLists.txt
index 13dd16f..ee9d6a5 100644
--- a/samples/StoryRobotArm/CMakeLists.txt
+++ b/samples/StoryRobotArm/CMakeLists.txt
@@ -52,7 +52,6 @@ target_include_directories(${ROBOT_ARM_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOUR
 find_package(Threads REQUIRED)
 
 # Add SDK includes
-target_include_directories(${ROBOT_ARM_SAMPLE_TARGET_NAME} PUBLIC ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src/include)
 target_include_directories(${ROBOT_ARM_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../../include)
 
 target_link_libraries(${ROBOT_ARM_SAMPLE_TARGET_NAME} PUBLIC "Threads::Threads")
diff --git a/samples/StorySwitch/CMakeLists.txt b/samples/StorySwitch/CMakeLists.txt
index 0096bad..2613c20 100644
--- a/samples/StorySwitch/CMakeLists.txt
+++ b/samples/StorySwitch/CMakeLists.txt
@@ -52,7 +52,6 @@ target_include_directories(${SWITCH_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_
 find_package(Threads REQUIRED)
 
 # Add SDK includes
-target_include_directories(${SWITCH_SAMPLE_TARGET_NAME} PUBLIC ${CMAKE_BINARY_DIR}/${DEPENDENCY_DIR}/rapidjson/src/include)
 target_include_directories(${SWITCH_SAMPLE_TARGET_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/../../include)
 
 target_link_libraries(${SWITCH_SAMPLE_TARGET_NAME} PUBLIC "Threads::Threads")
-- 
1.9.1