Skip to content

Support installing the package with CMake FetchContent #196

@adolfogc

Description

@adolfogc

Example snippet:

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions