Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: cmake/CMakeLists.txt

Issue 1349163003: experiment/fiddle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cmake/SkUserConfig.h.in » ('j') | experimental/fiddle/Makefile » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmake/CMakeLists.txt
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 36a6d1ecf3ca947363c8197efebd4a2e5e82a64c..96c6d706cfc2dc365f71ba0405e678b610df1742 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -27,6 +27,9 @@ find_include_dirs(private_includes ../src/*.h ../include/private/*.h)
find_include_dirs(public_includes ../include/*.h)
list (REMOVE_ITEM public_includes ${private_includes}) # Easiest way to exclude private.
+find_include_dirs(config_include ../include/config/*.h)
+list (REMOVE_ITEM public_includes ${config_include})
+
# These guys are third_party but provided by a Skia checkout.
list (APPEND srcs ../third_party/etc1/etc1.cpp ../third_party/ktx/ktx.cpp)
list (APPEND private_includes ../third_party/etc1 ../third_party/ktx)
@@ -100,7 +103,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
@@ -191,6 +193,7 @@ if (FONTCONFIG_INCLUDE_DIRS AND FONTCONFIG_LIBRARIES)
list (APPEND libs ${FONTCONFIG_LIBRARIES})
endif()
+
if (APPLE)
find_library(APPLICATION_SERVICES_FRAMEWORK ApplicationServices REQUIRED)
list (APPEND libs ${APPLICATION_SERVICES_FRAMEWORK})
@@ -199,33 +202,58 @@ endif()
find_package(OpenGL REQUIRED)
list (APPEND libs ${OPENGL_LIBRARIES})
+set(SK_MESA OFF CACHE BOOL "Support for off-screen Mesa OpenGL")
+if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
mtklein 2015/09/17 13:58:22 This seems unnecessary. SK_DEBUG / SK_RELEASE are
+ set(SK_DEBUG 1)
+ set(SK_RELEASE 0)
+else()
+ set(SK_DEBUG 0)
+ set(SK_RELEASE 1)
+endif()
+configure_file(SkUserConfig.h.in SkUserConfig.h)
mtklein 2015/09/17 13:58:22 Let's not do this. I haven't seen any need yet fo
+
# 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})
+if (UNIX AND NOT APPLE AND SK_MESA)
mtklein 2015/09/17 13:58:22 Why is this opt-in? Can we not just detect it lik
+ # TODO(halcanary): support SK_MESA+APPLE
+ list (APPEND libs "OSMesa")
+ # SK_MESA is used by fiddle.skia.org
+else()
+ remove_srcs(../src/gpu/gl/mesa/*)
+endif()
+
target_compile_definitions(skia
PUBLIC
PRIVATE -DSKIA_DLL)
target_include_directories(skia
PUBLIC ${public_includes}
+ ${CMAKE_BINARY_DIR}
PRIVATE ${private_includes})
target_link_libraries(skia
PUBLIC
PRIVATE ${libs})
-
set_target_properties(skia PROPERTIES
COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-deprecated-declarations"
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN true)
-# Experimental C API install:
-file(GLOB cheaders "../include/c/*.h")
-install(FILES ${cheaders} DESTINATION include)
+# Experimental install:
install(TARGETS skia DESTINATION lib)
+install(DIRECTORY ../include/c DESTINATION include/skia)
+install(DIRECTORY ../include/core DESTINATION include/skia)
mtklein 2015/09/17 13:58:22 Yeah, again, I think it's a bad idea to even insin
+install(DIRECTORY ../include/effects DESTINATION include/skia)
+install(DIRECTORY ../include/gpu DESTINATION include/skia)
+install(DIRECTORY ../include/pathops DESTINATION include/skia)
+install(DIRECTORY ../include/ports DESTINATION include/skia)
+install(DIRECTORY ../include/private DESTINATION include/skia)
+install(DIRECTORY ../include/utils DESTINATION include/skia)
+install(FILES ${CMAKE_BINARY_DIR}/SkUserConfig.h DESTINATION include/skia/core)
# Now build a simple example app that uses Skia via libskia.so.
add_executable(example example.cpp)
« no previous file with comments | « no previous file | cmake/SkUserConfig.h.in » ('j') | experimental/fiddle/Makefile » ('J')

Powered by Google App Engine
This is Rietveld 408576698