Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support installing the package with CMake FetchContent #196

Open
adolfogc opened this issue May 6, 2024 · 0 comments
Open

Support installing the package with CMake FetchContent #196

adolfogc opened this issue May 6, 2024 · 0 comments

Comments

@adolfogc
Copy link

adolfogc commented May 6, 2024

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".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant