From 08c79b855679f175c099f9038198ec657b40ea12 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Wed, 30 Nov 2016 15:35:33 -0500 Subject: [PATCH] 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 +++++++++++---------- tools/fiddle/fiddle_test | 48 ----------------------------------------- 2 files changed, 12 insertions(+), 61 deletions(-) delete mode 100755 tools/fiddle/fiddle_test diff --git a/experimental/c-api-example/c.md b/experimental/c-api-example/c.md index 3011f88..19ae515 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 diff --git a/tools/fiddle/fiddle_test b/tools/fiddle/fiddle_test deleted file mode 100755 index 19d97a9..0000000 --- a/tools/fiddle/fiddle_test +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# Copyright 2015 Google Inc. -# -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Script for building Fiddle build bots. - -set -e -set -x - -cd "$(dirname "$0")" -fiddle_dir="$PWD" -cd "../.." -skia_dir="$PWD" - -if ! command -v cmake > /dev/null 2>&1 ; then - cores=32 - echo "Bootstrapping CMake" - cmake_dir="${skia_dir}/third_party/externals/cmake" - ( - cd "$cmake_dir" - ./bootstrap --parallel=$cores - make -j $cores cmake - ) - export PATH="${cmake_dir}/bin:${PATH}" -fi - -echo "Building Skia and Fiddle" -( - cd "${skia_dir}/cmake" - cmake -G Ninja . - ninja skia -) - -tmp=$(mktemp -d "${TMPDIR:-/tmp}/fiddle_test.XXXXXXXXXX") - -cd "$fiddle_dir" - -${CXX:-c++} \ - "@../../cmake/skia_compile_arguments.txt" \ - -o "${tmp}/fiddle" \ - "fiddle_main.cpp" \ - "draw.cpp" \ - -lOSMesa \ - "@../../cmake/skia_link_arguments.txt" - -"${tmp}/fiddle" | sha1sum -- 2.7.4