diff options
author | halcanary <halcanary@google.com> | 2015-12-01 09:02:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-01 09:02:49 -0800 |
commit | 0cbe7ee765cf72f15e6ca10b308676aa077fb3e2 (patch) | |
tree | fb6c06bbf5b34e9bc72cb5b659ccd8ce46de3700 /cmake | |
parent | 9323dc6a72de301f23e1187adc2365395b4b23d8 (diff) |
CMake, include/: changes to make fiddle 2.0 better
cmake: remove unused directories from skia.h / ${public_includes}
SkPreConfig.h: work around buggy `#ifdef linux`
include: guard many platform-specific headers
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/1488813002
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 5f0049bdad..e77525d688 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -54,6 +54,10 @@ remove_srcs (../src/ports/SkFontMgr_custom*.cpp) # Skia sure ships a lot of code no one uses. remove_srcs (../src/animator/* ../src/*nacl* ../src/svg/* ../src/views/* ../src/xml/*) +foreach (include animator svg svg/parser views views/animated xml) + file (GLOB globed_include ../include/${include}) + list (REMOVE_ITEM public_includes ${globed_include}) +endforeach() # Remove OS-specific source files. if (NOT UNIX) @@ -286,6 +290,8 @@ endforeach() # c++ example.o @skia_link_arguments.txt # skia.h +set (bad_files GrGLConfig_chrome.h SkJSONCPP.h SkParsePaint.h) +# make `c++ @skia_compile_arguments.txt include/skia.h` work. set (skia_h_path ${userconfig_directory}/skia.h) file (WRITE ${skia_h_path} "// skia.h generated by CMake.\n") file(APPEND ${skia_h_path} "#ifndef skia_DEFINED\n") @@ -296,7 +302,9 @@ foreach (include ${public_includes}) file (GLOB all_public_headers ${include}/*.h) foreach (public_header ${all_public_headers}) get_filename_component (filename_component ${public_header} NAME) - file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") + if (NOT ";${bad_files};" MATCHES ";${filename_component};") + file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") + endif () endforeach() endif() endforeach() |