skia2/cmake
mtklein 1ee76510f5 Start making all .cpp files compile-able on all platforms.
I sometimes dream to hone our build process down to something as simple as
    $ find src -name '*.cpp' | xargs c++ <some cflags> -c -o skia.o

To start, it helps if we can compile all files on all platforms.  Each
non-portable file guards itself with defines provided by SkTypes.h.  This does
not convert all non-portable code, but it's a good representative chunk.

E.g. instead of having to remember which SkDebug_*.cpp to compile on which
platform we can just compile all three and let the code itself sort it out.

This has the nice side effect of making non-portable code declare the
conditions under which it can compile explicitly.

I've been testing mostly with the CMake build as it's easiest, but this should
apply equally to BUILD, Gyp, and GN files... to any build system really.

BUG=skia:4269
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1411283005
2015-11-02 10:20:27 -08:00
..
.gitignore CMake builds on Ubuntu now too. 2015-08-31 06:59:21 -07:00
cmake_build small tweaks to cmake_build 2015-09-15 10:17:08 -07:00
CMakeLists.txt Start making all .cpp files compile-able on all platforms. 2015-11-02 10:20:27 -08:00
example.cpp CMake builds on Ubuntu now too. 2015-08-31 06:59:21 -07:00
README.md CMake tweaks 2015-09-01 09:22:32 -07:00

CMake build for Skia

This directory contains experiemental CMake build files for Skia. They are primarily targeted at building Skia as it would be shipped, not at day-to-day Skia development.

Quickstart

$ cd skia/cmake
$ cmake . -G Ninja     # Other CMake generators should work fine.
$ ninja
$ ls -l libskia.* example
$ ./example
$ open example.png

If that works, you should see "Hello World!" with a green-to-purple gradient.

Currently supported platforms

(None. This is still super experimental.)

Currently maybe-kinda-working platforms

  • x86-64 Mac OS X, Ubuntu 15.04

Caveats

  • SkCodec, Skia's new image decoder library, does not yet build.