[CMake] Properly test if compiler supports compiler flags
[WebKit-https.git] / Source / ThirdParty / woff2 / CMakeLists.txt
1 set(WOFF2_DIR "${THIRDPARTY_DIR}/woff2")
2
3 set(WOFF2_INCLUDE_DIRECTORIES
4   "${WOFF2_DIR}/src"
5 )
6
7 set(WOFF2_SOURCES
8   ${WOFF2_DIR}/src/table_tags.cc
9   ${WOFF2_DIR}/src/variable_length.cc
10   ${WOFF2_DIR}/src/woff2_common.cc
11   ${WOFF2_DIR}/src/woff2_dec.cc
12   ${WOFF2_DIR}/src/woff2_out.cc
13 )
14
15 include_directories("${THIRDPARTY_DIR}/brotli/dec")
16 include_directories("${WOFF2_INCLUDE_DIRECTORIES}")
17 add_library(woff2 STATIC ${WOFF2_SOURCES})
18 target_link_libraries(woff2 brotli)
19
20 if (COMPILER_IS_GCC_OR_CLANG)
21     WEBKIT_ADD_TARGET_CXX_FLAGS(woff2 -Wno-cast-align
22                                       -Wno-implicit-fallthrough
23                                       -Wno-sign-compare
24                                       -Wno-unused-variable
25                                       -Wno-unused-parameter
26                                       -Wno-unused-but-set-variable)
27 endif ()