You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aws-lambda-cpp builds using the previous version of CMakeList.txt with: target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES})
And produces errors using the newly release version with: target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
The output for the second version is:
-- Configuring done
CMake Error at CMakeLists.txt:13 (add_library):
Target "aws-lambda-runtime" links to target "CURL::libcurl" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at CMakeLists.txt:13 (add_library):
Target "aws-lambda-runtime" links to target "CURL::libcurl" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
-- Generating done
-- Build files have been written to: /github/aws-lambda-cpp/built
Looks like the imported target CURL::libcurl was introduced in CMake 3.12
(See Kitware/CMake@83c0cb3)
And the CMake version that apt provides in Ubuntu 18.04 is CMake 3.10.2
I will revert the change. Meanwhile, I recommend using the latest CMake. And since apt never provides the latest version (unlike Homebrew), you can follow the steps here https://askubuntu.com/a/865294 to upgrade.
Note that upgrading CMake is almost always a good idea since it's not a library on which other applications depend on. So, you will not break anything by upgrading.
Activity
marcomagdy commentedon Jun 13, 2019
What version of CMake are you using?
marcomagdy commentedon Jun 14, 2019
Looks like the imported target CURL::libcurl was introduced in CMake 3.12
(See Kitware/CMake@83c0cb3)
And the CMake version that apt provides in Ubuntu 18.04 is CMake 3.10.2
marcomagdy commentedon Jun 14, 2019
I will revert the change. Meanwhile, I recommend using the latest CMake. And since apt never provides the latest version (unlike Homebrew), you can follow the steps here https://askubuntu.com/a/865294 to upgrade.
Note that upgrading CMake is almost always a good idea since it's not a library on which other applications depend on. So, you will not break anything by upgrading.
miryee commentedon Jun 14, 2019
I am using cmake version 3.10.2-1ubuntu2,
FindCURL module does not provide imported target on older CMake versions
mrahman4 commentedon Jun 20, 2019
I've the same issue. Should I use the commit#0bcaf3d?
marcomagdy commentedon Jun 20, 2019
You can. Or better yet upgrade the CMake version on your machine?
see https://github.com/awslabs/aws-lambda-cpp/blob/master/ci/docker/ubuntu-linux-18.04#L5
FindCURL module does not provide imported target on older CMake versi…