Skip to content

CMAKE issue with latest CRT v0.30.1 #776

Closed
@thomas-roos

Description

@thomas-roos

Describe the bug

Due to a change in CMakefiles in CRT
Similar changes like here: aws/aws-sdk-cpp@e932b19#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a

Needs to applied

Same issue, same solution: aws/aws-sdk-cpp#3281

Expected Behavior

compiles

Current Behavior

cmake breaks

Reproduction Steps

build with latest CRT

Possible Solution

Index: git/CMakeLists.txt
===================================================================
--- git.orig/CMakeLists.txt
+++ git/CMakeLists.txt
@@ -37,10 +37,7 @@ if (${CMAKE_INSTALL_LIBDIR} STREQUAL "li
 endif()
 
 # This is required in order to append /lib/cmake to each element in CMAKE_PREFIX_PATH
-set(AWS_MODULE_DIR "/${CMAKE_INSTALL_LIBDIR}/cmake")
-string(REPLACE ";" "${AWS_MODULE_DIR};" AWS_MODULE_PATH "${CMAKE_PREFIX_PATH}${AWS_MODULE_DIR}")
-# Append that generated list to the module search path
-list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH})
+find_package(aws-c-common REQUIRED)
 
 if (NOT CMAKE_BUILD_TYPE)
     if (NOT WIN32)

Additional Information/Context

No response

SDK version used

1.34

Environment details (OS name and version, etc.)

Yocto / meta-aws

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions