diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files')
5 files changed, 371 insertions, 0 deletions
diff --git a/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Add-C-as-a-build-language.patch b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Add-C-as-a-build-language.patch new file mode 100644 index 00000000..7cf150f6 --- /dev/null +++ b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Add-C-as-a-build-language.patch @@ -0,0 +1,110 @@ +From ec1e8828ce3067d6902c04a75952a3535292040c Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Fri, 8 Dec 2017 10:41:10 +0000 +Subject: [PATCH 1/5] Add C as a build language + +Signed-off-by: Scott Ware <scott.r.ware@intel.com> +--- + CMakeLists.txt | 2 +- + cli/CMakeLists.txt | 2 +- + samples/Discovery/CMakeLists.txt | 2 +- + samples/PubSub/CMakeLists.txt | 2 +- + samples/ShadowDelta/CMakeLists.txt | 2 +- + samples/StoryRobotArm/CMakeLists.txt | 4 ++-- + samples/StorySwitch/CMakeLists.txt | 4 ++-- + 7 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad8a4e1..9df255f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-sdk-cpp CXX) ++project(aws-iot-sdk-cpp C CXX) + option(BUILD_SHARED_LIBRARY "Build the library as a shared object, will build it as a static library otherwise" NO) + + ###################################### +diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt +index da4f25d..dfa5040 100644 +--- a/cli/CMakeLists.txt ++++ b/cli/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-cli CXX) ++project(aws-iot-cli C CXX) + + ###################################### + # Section : Disable in-source builds # +diff --git a/samples/Discovery/CMakeLists.txt b/samples/Discovery/CMakeLists.txt +index 8df8d35..3147841 100644 +--- a/samples/Discovery/CMakeLists.txt ++++ b/samples/Discovery/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-cpp-samples CXX) ++project(aws-iot-cpp-samples C CXX) + + ###################################### + # Section : Disable in-source builds # +diff --git a/samples/PubSub/CMakeLists.txt b/samples/PubSub/CMakeLists.txt +index 62ffd05..33531d0 100644 +--- a/samples/PubSub/CMakeLists.txt ++++ b/samples/PubSub/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-cpp-samples CXX) ++project(aws-iot-cpp-samples C CXX) + + ###################################### + # Section : Disable in-source builds # +diff --git a/samples/ShadowDelta/CMakeLists.txt b/samples/ShadowDelta/CMakeLists.txt +index 98aa3b9..1ebabed 100644 +--- a/samples/ShadowDelta/CMakeLists.txt ++++ b/samples/ShadowDelta/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-cpp-samples CXX) ++project(aws-iot-cpp-samples C CXX) + + ###################################### + # Section : Disable in-source builds # +diff --git a/samples/StoryRobotArm/CMakeLists.txt b/samples/StoryRobotArm/CMakeLists.txt +index 215df18..13dd16f 100644 +--- a/samples/StoryRobotArm/CMakeLists.txt ++++ b/samples/StoryRobotArm/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-cpp-samples CXX) ++project(aws-iot-cpp-samples C CXX) + + ###################################### + # Section : Disable in-source builds # +@@ -84,4 +84,4 @@ endif () + ######################### + + set(NETWORK_WRAPPER_DEST_TARGET ${ROBOT_ARM_SAMPLE_TARGET_NAME}) +-include(${PROJECT_SOURCE_DIR}/../../network/CMakeLists.txt.in) +\ No newline at end of file ++include(${PROJECT_SOURCE_DIR}/../../network/CMakeLists.txt.in) +diff --git a/samples/StorySwitch/CMakeLists.txt b/samples/StorySwitch/CMakeLists.txt +index e612567..0096bad 100644 +--- a/samples/StorySwitch/CMakeLists.txt ++++ b/samples/StorySwitch/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-cpp-samples CXX) ++project(aws-iot-cpp-samples C CXX) + + ###################################### + # Section : Disable in-source builds # +@@ -84,4 +84,4 @@ endif () + ######################### + + set(NETWORK_WRAPPER_DEST_TARGET ${SWITCH_SAMPLE_TARGET_NAME}) +-include(${PROJECT_SOURCE_DIR}/../../network/CMakeLists.txt.in) +\ No newline at end of file ++include(${PROJECT_SOURCE_DIR}/../../network/CMakeLists.txt.in) +-- +1.9.1 + diff --git a/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Add-build-options-for-tests-and-samples.patch b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Add-build-options-for-tests-and-samples.patch new file mode 100644 index 00000000..59f61891 --- /dev/null +++ b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Add-build-options-for-tests-and-samples.patch @@ -0,0 +1,57 @@ +From b14988149080ab9d5f1883c1e881b548be1cd7aa Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Fri, 8 Dec 2017 10:44:46 +0000 +Subject: [PATCH 2/5] Add build options for tests and samples + +Signed-off-by: Scott Ware <scott.r.ware@intel.com> +--- + CMakeLists.txt | 25 +++++++++++++------------ + 1 file changed, 13 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9df255f..cb0ad9d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,6 +11,8 @@ if(${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR}) + endif() + + option(BUILD_DOCS "Create HTML based API documentation (requires Doxygen)" OFF) ++option(BUILD_SAMPLES "Build samples" OFF) ++option(RUN_TESTS "Run unit and integration tests" OFF) + + ######################################## + # Section : Common SDK Build setttings # +@@ -155,19 +157,18 @@ if(UNIX) + add_subdirectory(cli) + endif() + +-add_subdirectory(tests/integration) +- +-add_subdirectory(tests/unit) +- +-add_subdirectory(samples/PubSub) +- +-add_subdirectory(samples/ShadowDelta) +- +-add_subdirectory(samples/Discovery EXCLUDE_FROM_ALL) +- +-add_subdirectory(samples/StoryRobotArm EXCLUDE_FROM_ALL) ++if(RUN_TESTS) ++ add_subdirectory(tests/integration) ++ add_subdirectory(tests/unit) ++endif() + +-add_subdirectory(samples/StorySwitch EXCLUDE_FROM_ALL) ++if(BUILD_SAMPLES) ++ add_subdirectory(samples/PubSub) ++ add_subdirectory(samples/ShadowDelta) ++ add_subdirectory(samples/Discovery EXCLUDE_FROM_ALL) ++ add_subdirectory(samples/StoryRobotArm EXCLUDE_FROM_ALL) ++ add_subdirectory(samples/StorySwitch EXCLUDE_FROM_ALL) ++endif() + + ################################## + # Section: Define Install Target # +-- +1.9.1 + diff --git a/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Fix-CLI-includes.patch b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Fix-CLI-includes.patch new file mode 100644 index 00000000..8605f6d0 --- /dev/null +++ b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Fix-CLI-includes.patch @@ -0,0 +1,26 @@ +From 96f31a4d9b0c5ba156dfb6263f8bed3b12884c8a Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Fri, 8 Dec 2017 10:45:45 +0000 +Subject: [PATCH 3/5] Fix CLI includes + +Signed-off-by: Scott Ware <scott.r.ware@intel.com> +--- + cli/cli.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cli/cli.hpp b/cli/cli.hpp +index 4f3634c..f0f1ee2 100644 +--- a/cli/cli.hpp ++++ b/cli/cli.hpp +@@ -26,7 +26,7 @@ + #include <direct.h> + #define getcwd _getcwd // avoid MSFT "deprecation" warning + #else +-#include <limits> ++#include <linux/limits.h> + #define MAX_PATH_LENGTH_ PATH_MAX + #endif + +-- +1.9.1 + diff --git a/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Packaging-fixes.patch b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Packaging-fixes.patch new file mode 100644 index 00000000..32c880e6 --- /dev/null +++ b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Packaging-fixes.patch @@ -0,0 +1,67 @@ +From 3db20a53f35f9d0413c312b46815f6b16fe0afa4 Mon Sep 17 00:00:00 2001 +From: Scott Ware <scott.r.ware@intel.com> +Date: Fri, 8 Dec 2017 10:52:20 +0000 +Subject: [PATCH 4/5] Packaging fixes + +Signed-off-by: Scott Ware <scott.r.ware@intel.com> +--- + CMakeLists.txt | 12 ++++++++---- + awsiotsdk-cpp.pc.in | 11 +++++++++++ + 2 files changed, 19 insertions(+), 4 deletions(-) + create mode 100644 awsiotsdk-cpp.pc.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cb0ad9d..fa98c30 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,9 @@ + cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +-project(aws-iot-sdk-cpp C CXX) ++project(aws-iot-sdk-cpp VERSION 1.3.0 LANGUAGES C CXX) + option(BUILD_SHARED_LIBRARY "Build the library as a shared object, will build it as a static library otherwise" NO) + ++include(GNUInstallDirs) ++ + ###################################### + # Section : Disable in-source builds # + ###################################### +@@ -51,7 +53,7 @@ add_definitions(-DSDK_VERSION_STRING="1.3.0") + set(SDK_TARGET_NAME aws-iot-sdk-cpp) + if (BUILD_SHARED_LIBRARY) + add_library(${SDK_TARGET_NAME} SHARED "") +- set_target_properties(${SDK_TARGET_NAME} PROPERTIES SUFFIX ".so") ++ set_target_properties(${SDK_TARGET_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} VERSION ${PROJECT_VERSION}) + else() + add_library(${SDK_TARGET_NAME} "") + endif() +@@ -174,6 +176,8 @@ endif() + # Section: Define Install Target # + ################################## + if(NOT MSVC) +- install(TARGETS aws-iot-sdk-cpp DESTINATION lib) +- install(DIRECTORY include/ DESTINATION include) ++ install(TARGETS aws-iot-sdk-cpp DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/awsiotsdk) ++ configure_file (awsiotsdk-cpp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/awsiotsdk-cpp.pc @ONLY) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/awsiotsdk-cpp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif() +diff --git a/awsiotsdk-cpp.pc.in b/awsiotsdk-cpp.pc.in +new file mode 100644 +index 0000000..0828942 +--- /dev/null ++++ b/awsiotsdk-cpp.pc.in +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++libdir=@CMAKE_INSTALL_LIBDIR@ ++includedir=@CMAKE_INSTALL_INCLUDEDIR@/awsiotsdk ++ ++Name: awsiotsdk-cpp ++Description: SDK for connecting to AWS IoT from a device using C++ ++Version: @PROJECT_VERSION@ ++ ++Libs: -L${libdir} -laws-iot-sdk-cpp ++Cflags: -I${includedir} +-- +1.9.1 + diff --git a/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Skip-building-RapidJSON.patch b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Skip-building-RapidJSON.patch new file mode 100644 index 00000000..699f2be8 --- /dev/null +++ b/external/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-cpp/files/Skip-building-RapidJSON.patch @@ -0,0 +1,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 + |