aws-lambda-cpp icon indicating copy to clipboard operation
aws-lambda-cpp copied to clipboard

Support installing the package with CMake FetchContent

Open adolfogc opened this issue 1 year ago • 0 comments

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".

adolfogc avatar May 06 '24 01:05 adolfogc