Index: cmake/CMakeLists.txt |
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt |
index 36a6d1ecf3ca947363c8197efebd4a2e5e82a64c..b02d942208e1f7bf5b459bc351a793dbf8a19ba7 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,14 +198,26 @@ endif() |
find_package(OpenGL REQUIRED) |
list (APPEND libs ${OPENGL_LIBRARIES}) |
+list (APPEND private_defines "-DSKIA_DLL") |
mtklein_C
2015/09/21 16:14:39
As a nit, let's move this out of where all the dep
hal.canary
2015/09/21 16:35:57
Done.
|
+ |
+find_library(OSMESA_LIBRARIES "OSMesa") |
mtklein_C
2015/09/21 16:14:39
Let's put the find_* together with the others abov
hal.canary
2015/09/21 16:35:57
Done.
|
+find_path (OSMESA_INCLUDE_DIRS "GL/osmesa.h") |
+if (OSMESA_LIBRARIES AND OSMESA_INCLUDE_DIRS) |
+ list (APPEND libs ${OSMESA_LIBRARIES}) |
mtklein_C
2015/09/21 16:14:39
Add OSMESA_INCLUDE_DIRS to private_includes?
hal.canary
2015/09/21 16:35:57
It was just /usr/include; but no harm. done.
|
+ list (APPEND public_defines "-DSK_MESA=1") |
+ message("-- Found OSMesa: " ${OSMESA_LIBRARIES}) |
mtklein_C
2015/09/21 16:14:39
Remove this. It'll print anyway
|
+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. |
add_library (skia SHARED ${srcs}) |
target_compile_definitions(skia |
- PUBLIC |
- PRIVATE -DSKIA_DLL) |
+ PUBLIC ${public_defines} |
+ PRIVATE ${private_defines}) |
target_include_directories(skia |
PUBLIC ${public_includes} |