Skip to content

Commit 8fca95d

Browse files
committed
aws-iot-device-sdk-cpp-v2: fix build with latest CRT
Breaking change in CMAKE file of CRT libs. aws/aws-iot-device-sdk-cpp-v2#776 (cherry picked from commit 22d2bed)
1 parent 3e243de commit 8fca95d

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Upstream-Status: Submitted [https://github.com/aws/aws-iot-device-sdk-cpp-v2/issues/776]
2+
3+
Index: git/CMakeLists.txt
4+
===================================================================
5+
--- git.orig/CMakeLists.txt
6+
+++ git/CMakeLists.txt
7+
@@ -37,10 +37,7 @@ if (${CMAKE_INSTALL_LIBDIR} STREQUAL "li
8+
endif()
9+
10+
# This is required in order to append /lib/cmake to each element in CMAKE_PREFIX_PATH
11+
-set(AWS_MODULE_DIR "/${CMAKE_INSTALL_LIBDIR}/cmake")
12+
-string(REPLACE ";" "${AWS_MODULE_DIR};" AWS_MODULE_PATH "${CMAKE_PREFIX_PATH}${AWS_MODULE_DIR}")
13+
-# Append that generated list to the module search path
14+
-list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH})
15+
+find_package(aws-c-common REQUIRED)
16+
17+
if (NOT CMAKE_BUILD_TYPE)
18+
if (NOT WIN32)

recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2_1.34.0.bb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ PROVIDES += "aws/aws-iot-device-sdk-cpp-v2"
1111

1212
require aws-iot-device-sdk-cpp-v2-version.inc
1313

14-
SRC_URI:append = " file://run-ptest"
14+
SRC_URI:append = " \
15+
file://run-ptest \
16+
file://001-cmake-aws-module-path.patch \
17+
"
1518

1619
S = "${WORKDIR}/git"
1720

0 commit comments

Comments
 (0)