Otok public index

apotocki/googletest

apotocki/googletest 1.18.0 (r1, android)

Library
googletest
Variant
android, target android
Channel
stable
Published
2026-11-07
Recipe source
https://github.com/otok-dev/recipes.git
32756a87cf5bd189ca4c9825159bf0713ea8cf5e in recipes/googletest/1.18/android/
Recipe SHA-256
bdc7d0b76c529a9d58cc09f6b6dc9a3bae5fe64a1f22827e21b34fab1645f26d

Recipe files changed

Inputs

source.commit063de7e9578f82b369302001269680b4b1553359
source.githttps://github.com/google/googletest
source.tagv1.18.0

Platforms

android

Toolchains

Recipe files

build.lua 544 bytes · raw
-- The CMake project with gmock, without its own tests: libgtest.a, libgtest_main.a, libgmock.a,
-- libgmock_main.a, and one include/ with gtest/ and gmock/.
function build(slice, options, deps)
    otok.cmake{
        defines = { BUILD_GMOCK = true, INSTALL_GTEST = true },
    }
    local p = slice.prefix
    local libraries = {}
    for _, name in ipairs{ "gtest", "gtest_main", "gmock", "gmock_main" } do
        libraries[name] = p .. "/lib/lib" .. name .. ".a"
    end
    return { libraries = libraries, headers = p .. "/include" }
end
recipe.toml 1215 bytes · raw
# The otok recipe of GoogleTest (https://github.com/apotocki/otok): gtest and gmock with their main libraries,
# static, for the native tests of Android apps, from the release tag.
[recipe]
api = 1
library = "googletest"
name = "googletest"
version = "1.18.0"
revision = 1
license = "BSD-3-Clause"
license-files = ["LICENSE"]
homepage = "https://github.com/google/googletest"
description = "GoogleTest and GoogleMock, Google's C++ test framework."
keywords = ["testing", "gtest", "gmock"]
linkage = ["static"]
cxx-standard = ">= 17"

[source]
git = "https://github.com/google/googletest"
commit = "063de7e9578f82b369302001269680b4b1553359"
tag = "v1.18.0"

[platforms]
supported = ["android"]
build-on = ["*/ndk"]

[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }

[[product]]
name = "GTest"
libraries = ["gtest"]
link = { runtime = "c++" }

[[product]]
name = "GTestMain"
libraries = ["gtest_main"]
headers = false
depends = ["GTest"]

[[product]]
name = "GMock"
libraries = ["gmock"]
headers = false
depends = ["GTest"]

[[product]]
name = "GMockMain"
libraries = ["gmock_main"]
headers = false
depends = ["GMock"]