Skip to content

Commit

Permalink
cmake tweaks
Browse files Browse the repository at this point in the history
  • -w silences all warnings current and future.  We're not using this for development.
  • There's no real need to exclude files in Release mode.
    The linker may whine a little, but that's fine.
  • Quiet down message() calls that run every time.  They're fine if you can figure out
    how to run them only when doing the detection and cache them like all the others,
    but I don't like the noise seeing them every run.
  • cheaders is hard to read.  c_headers.
  • ../src/*mac* erroneously picks up SkLumaColorFilter on non-case-sensitive file systems.
    ../src/*_mac* seems fine.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1376923003
  • Loading branch information
mtklein authored and Commit bot committed Sep 29, 2015
1 parent 242397a commit a5b0f03
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ remove_srcs (../src/utils/SkThreadUtils_pthread_*.cpp)
# Skia sure ships a lot of code no one uses.
remove_srcs (../src/animator/* ../src/*nacl* ../src/svg/* ../src/views/* ../src/xml/*)

# Some files only contain code in Debug mode. This quiets down some linker warnings.
if (NOT CMAKE_BUILD_TYPE STREQUAL Debug)
remove_srcs (../src/core/SkDebug.cpp ../src/utils/SkDumpCanvas.cpp)
endif()

# Remove OS-specific source files.
if (NOT WIN32)
remove_srcs(../src/*XPS*
Expand All @@ -79,7 +74,7 @@ if (NOT APPLE)
remove_srcs(../src/*darwin*
../src/ports/SkImageDecoder_CG.cpp
../src/utils/mac/*
../src/*mac*)
../src/*_mac*)
endif()

# Remove processor-specific source files.
Expand Down Expand Up @@ -201,10 +196,8 @@ if (OSMESA_LIBRARIES AND OSMESA_INCLUDE_DIRS)
list (APPEND libs ${OSMESA_LIBRARIES})
list (APPEND private_includes ${OSMESA_INCLUDE_DIRS})
list (APPEND public_defines "-DSK_MESA=1")
message("-- Found OSMesa: " ${OSMESA_LIBRARIES})
else()
remove_srcs(../src/gpu/gl/mesa/*)
message("-- Could NOT find OSMesa")
endif()

find_package(OpenGL REQUIRED)
Expand All @@ -231,13 +224,13 @@ target_link_libraries(skia


set_target_properties(skia PROPERTIES
COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-deprecated-declarations"
COMPILE_FLAGS "-w -fno-exceptions -fno-rtti"
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN true)

# Experimental C API install:
file(GLOB cheaders "../include/c/*.h")
install(FILES ${cheaders} DESTINATION include)
file(GLOB c_headers "../include/c/*.h")
install(FILES ${c_headers} DESTINATION include)
install(TARGETS skia DESTINATION lib)

# Now build a simple example app that uses Skia via libskia.so.
Expand Down

0 comments on commit a5b0f03

Please sign in to comment.