Chromium Code Reviews| Index: cmake/CMakeLists.txt |
| diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt |
| index 36a6d1ecf3ca947363c8197efebd4a2e5e82a64c..50e45d2226d43cbce693eb6c8205fde9bc378027 100644 |
| --- a/cmake/CMakeLists.txt |
| +++ b/cmake/CMakeLists.txt |
| @@ -100,7 +100,6 @@ remove_srcs( |
| ../src/gpu/gl/command_buffer/* |
| ../src/gpu/gl/egl/* |
| ../src/gpu/gl/iOS/* |
| - ../src/gpu/gl/mesa/* |
| ../src/opts/SkBitmapProcState_opts_none.cpp |
| ../src/opts/SkBlitMask_opts_none.cpp |
| ../src/opts/SkBlitRow_opts_none.cpp |
| @@ -199,6 +198,13 @@ endif() |
| find_package(OpenGL REQUIRED) |
| list (APPEND libs ${OPENGL_LIBRARIES}) |
| +if (UNIX AND NOT APPLE AND EXISTS "/usr/include/GL/osmesa.h") |
| + set(SK_MESA 1) |
| + list (APPEND libs "OSMesa") |
| +else() |
| + remove_srcs(../src/gpu/gl/mesa/*) |
| +endif() |
| + |
| # This is our main output, libskia.so. |
| # We mostly build an .so here because it helps test we've linked everything, |
| # not so much that we think Skia is a good candidate to ship as a shared library. |
| @@ -208,6 +214,12 @@ target_compile_definitions(skia |
| PUBLIC |
| PRIVATE -DSKIA_DLL) |
| +if (SK_MESA) |
| + target_compile_definitions(skia |
|
mtklein
2015/09/21 15:51:56
Even if this works, I'd prefer it if you switch th
|
| + PUBLIC -DSK_MESA |
| + PRIVATE -DSK_MESA) |
| +endif() |
| + |
| target_include_directories(skia |
| PUBLIC ${public_includes} |
| PRIVATE ${private_includes}) |