aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/c-api-example
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-11-30 15:35:33 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-30 20:37:45 +0000
commit08c79b855679f175c099f9038198ec657b40ea12 (patch)
tree97fea9add9bb8b72f76bdfc9843cc017aad8c978 /experimental/c-api-example
parentc293a29bc2fced15ac44a66efa813d42cb3f2e0b (diff)
remove more old cmake files
NOTRY=true Change-Id: I53326b62467aeb6346325597f0223e247fefed8c Reviewed-on: https://skia-review.googlesource.com/5391 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'experimental/c-api-example')
-rw-r--r--experimental/c-api-example/c.md25
1 files changed, 12 insertions, 13 deletions
diff --git a/experimental/c-api-example/c.md b/experimental/c-api-example/c.md
index 3011f8892b..19ae515f19 100644
--- a/experimental/c-api-example/c.md
+++ b/experimental/c-api-example/c.md
@@ -103,30 +103,29 @@ Here is an example program that uses the C api. To try it out, get the file
<a href="https://fiddle.skia.org/c/6c6c01438d9c3d80e9c22e606359432e"><img src="https://fiddle.skia.org/i/6c6c01438d9c3d80e9c22e606359432e_raster.png" alt=""></a>
-Cmake example
--------------
+Example
+-------
The following proof-of-concept workflow currently works on MacOS and
-Ubuntu and depends on a C/C++ compiler, git, and cmake:
+Ubuntu.
-1. Aquire, compile, and install Skia as a shared library:
+1. Compile Skia as a shared library:
<!--?prettify lang=sh?-->
- prefix="$HOME"
- cd $(mktemp -d /tmp/skiaXXXX)
- git clone 'https://skia.googlesource.com/skia'
- cmake -DCMAKE_INSTALL_PREFIX:PATH="$prefix" skia/cmake
- cmake --build . --target skia
- cmake --build . --target install
+ cd ...../skia
+ bin/sync
+ gn gen out/Shared --args='is_official_build=true is_component_build=true'
+ ninja -C out/Shared
+ SKIA_LIB_DIR="${PWD}/out/Shared"
2. Compile, link, and run the example program:
<!--?prettify lang=sh?-->
- cc -o skia-c-example -I "$prefix/include" \
- skia/experimental/c-api-example/skia-c-example.c \
- "$prefix"/lib/libskia.* -Wl,-rpath -Wl,"$prefix/lib"
+ cc -o skia-c-example -I include/c \
+ experimental/c-api-example/skia-c-example.c \
+ "$SKIA_LIB_DIR"/libskia.* -Wl,-rpath -Wl,"$SKIA_LIB_DIR"
./skia-c-example
[ $(uname) = Darwin ] && open skia-c-example.png
[ $(uname) = Linux ] && xdg-open skia-c-example.png