awslabs / awslabs/aws-lambda-cpp

Support installing the package with CMake FetchContent

Open
#196 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
465
Forks
98
Avg merge
12h 47m
Merged PRs (30d)
3

Description

Example snippet:
```cmake
set(BUILD_SHARED_LIBS ON)
FetchContent_Declare(
aws-lambda-cpp
GIT_REPOSITORY https://github.com/awslabs/aws-lambda-cpp.git
GIT_TAG v0.2.10
GIT_SHALLOW TRUE
OVERRIDE_FIND_PACKAGE TRUE
)
unset(BUILD_SHARED_LIBS CACHE)

find_package(aws-lambda-cpp)

target_link_libraries(${PROJECT_NAME} PRIVATE aws-lambda-cpp::aws-lambda-runtime)

aws_lambda_package_target(${PROJECT_NAME} NO_LIBC)
```

Currently fails with the following error:

```shell
CMake Error at CMakeLists.txt:48:
Parse error. Expected a command name, got unquoted argument with text
"aws-lambda-cpp::aws_lambda_package_target".
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided CMake FetchContent snippet and inspect the package's CMake integration for how aws_lambda_package_target is exposed. Done means the example configures without the parse error and can link aws-lambda-cpp::aws-lambda-runtime and invoke the packaging command.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.