From 08c79b855679f175c099f9038198ec657b40ea12 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Wed, 30 Nov 2016 15:35:33 -0500 Subject: remove more old cmake files NOTRY=true Change-Id: I53326b62467aeb6346325597f0223e247fefed8c Reviewed-on: https://skia-review.googlesource.com/5391 Reviewed-by: Hal Canary Commit-Queue: Hal Canary --- experimental/c-api-example/c.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'experimental/c-api-example') 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 -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: - 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: - 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 -- cgit v1.2.3