forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSkia.cmake
31 lines (27 loc) · 988 Bytes
/
Skia.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
list(APPEND ImageDiff_SOURCES
skia/PlatformImageSkia.cpp
)
if (NOT USE_SYSTEM_MALLOC)
#
# Skia is built to use bmalloc/fastMalloc, but ImageDiff should not
# link to WTF. Adding the malloc allocator source will make the linker
# skip the memory allocator symbols from the Skia static library, thus
# avoiding the need to link to WTF.
#
list(APPEND ImageDiff_SOURCES
${THIRDPARTY_DIR}/skia/src/ports/SkMemory_malloc.cpp
)
if (NOT DEFINED CXX_COMPILER_SUPPORTS_-Wno-unused-parameter)
check_cxx_compiler_flag(-Wno-unused-parameter CXX_COMPILER_SUPPORTS_-Wno-unused-parameter)
endif ()
if (CXX_COMPILER_SUPPORTS_-Wno-unused-parameter)
set_property(
SOURCE ${THIRDPARTY_DIR}/skia/src/ports/SkMemory_malloc.cpp
APPEND PROPERTY COMPILE_OPTIONS -Wno-unused-parameter
)
endif ()
endif ()
list(APPEND ImageDiff_LIBRARIES
Skia
)
list(APPEND ImageDiff_PRIVATE_DEFINITIONS USE_SKIA=1)