-
-
Notifications
You must be signed in to change notification settings - Fork 417
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
New package: google-cloud-cpp #5991
base: dev
Are you sure you want to change the base?
Changes from 4 commits
3727031
64bc9eb
b876c88
bfafca5
c81b076
206bbe0
c3b660b
b55c843
8e02a80
1de15d4
c13550d
8c73126
8702009
2133825
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package("google-cloud-cpp") | ||
set_homepage("https://github.com/googleapis/google-cloud-cpp") | ||
set_description("C++ Client Libraries for Google Cloud Services") | ||
set_license("Apache-2.0") | ||
|
||
add_urls("https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v$(version).tar.gz", | ||
"https://github.com/googleapis/google-cloud-cpp.git") | ||
add_versions("2.32.0","db69dd73ef4af8b2e816d80ded04950036d0e0dccc274f8c3d3ed1d7f5692a1b") | ||
|
||
add_deps("cmake") | ||
add_deps("abseil", "crc32c", "libcurl", "openssl3", "zlib") | ||
add_deps("nlohmann_json", {configs = {cmake = true}}) | ||
|
||
on_check(function (package) | ||
if package:is_plat("android") then | ||
raise("package(google-cloud-cpp) unsupported on android due to package(grpc) is unsupported on android yet.") | ||
end | ||
if package:is_plat("mingw") then | ||
raise("package(google-cloud-cpp) unsupported on android due to package(grpc) is unsupported on mingw yet.") | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. checking for Minimal target version of Xcode for macosx (arm64) ... 14.5 |
||
end) | ||
|
||
on_install(function (package) | ||
local configs = { | ||
"-DBUILD_TESTING=OFF", | ||
"-DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF", | ||
"-DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF", | ||
"-DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF", | ||
} | ||
import("package.tools.cmake").install(package, configs) | ||
end) | ||
|
||
on_load(function (package) | ||
if package:config("shared") then | ||
package:add("deps","protobuf-cpp",{shared= true}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add spaces " , "
|
||
package:add("deps","grpc",{shared= true}) | ||
else | ||
package:add("deps","protobuf-cpp") | ||
package:add("deps","grpc") | ||
end | ||
|
||
end) | ||
|
||
on_test(function (package) | ||
assert(package:check_cxxsnippets({test = [[ | ||
#include "google/cloud/version.h" | ||
int test() { | ||
google::cloud::version_string(); | ||
return 0; | ||
} | ||
]]}, {configs = {languages = "c++17"}})) | ||
end) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we just use
to limit platforms instead of
on_check