From e212789b0881698dc58158af903d1dd123d22dd8 Mon Sep 17 00:00:00 2001 From: halcanary Date: Tue, 1 Sep 2015 13:37:02 -0700 Subject: Experimental: document that cmake + c api example now works in Ubuntu. NOTRY=true TBR= Review URL: https://codereview.chromium.org/1318823011 --- experimental/c-api-example/c.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'experimental/c-api-example') diff --git a/experimental/c-api-example/c.md b/experimental/c-api-example/c.md index ce2228995e..4566b94a4c 100644 --- a/experimental/c-api-example/c.md +++ b/experimental/c-api-example/c.md @@ -103,6 +103,8 @@ Here is an example program that uses the C api. To try it out, get the file + -Cmake+MacOS example -------------------- +Cmake example +------------- -The following proof-of-concept workflow currently works on MacOS +The following proof-of-concept workflow currently works on MacOS and Ubuntu -1. Aquire Skia and install dependencies (you may have already done this): +1. Aquire Skia (you may have already done this): @@ -149,7 +152,7 @@ The following proof-of-concept workflow currently works on MacOS git clone 'https://skia.googlesource.com/skia' SKIA_DIR="$PWD/skia" -2. Compile Skia as a shared library: +2. Compile Skia (outside of source) as a shared library: @@ -164,10 +167,13 @@ The following proof-of-concept workflow currently works on MacOS cd [Wherever you want the example] + mkdir skia_c_example + cd skia_c_example cp "$SKIA_DIR/experimental/c-api-example/skia-c-example.c" . cc -c -I "$SKIA_DIR/include/c" skia-c-example.c -o skia-c-example.o c++ skia-c-example.o \ "$SKIA_BUILD"/libskia.* -Wl,-rpath -Wl,"$SKIA_BUILD" \ -o skia-c-example ./skia-c-example - open skia-c-example.png + [ $(uname) = Darwin ] && open skia-c-example.png + [ $(uname) = Linux ] && xdg-open skia-c-example.png -- cgit v1.2.3