[CMake] Properly test if compiler supports compiler flags
[WebKit-https.git] / Source / ThirdParty / xdgmime / CMakeLists.txt
1 set(XDGMIME_DIR "${THIRDPARTY_DIR}/xdgmime")
2
3 set(XDGMIME_INCLUDE_DIRECTORIES
4     "${XDGMIME_DIR}/src"
5     "${CMAKE_BINARY_DIR}"
6 )
7
8 set(XDGMIME_SOURCES
9     ${XDGMIME_DIR}/src/xdgmimealias.c
10     ${XDGMIME_DIR}/src/xdgmime.c
11     ${XDGMIME_DIR}/src/xdgmimeicon.c
12     ${XDGMIME_DIR}/src/xdgmimeint.c
13     ${XDGMIME_DIR}/src/xdgmimemagic.c
14     ${XDGMIME_DIR}/src/xdgmimeparent.c
15     ${XDGMIME_DIR}/src/xdgmimecache.c
16     ${XDGMIME_DIR}/src/xdgmimeglob.c
17 )
18
19 include_directories("${XDGMIME_INCLUDE_DIRECTORIES}")
20 add_definitions(-DXDG_PREFIX=_wk_xdg)
21 add_library(xdgmime STATIC ${XDGMIME_SOURCES})
22
23 if (COMPILER_IS_GCC_OR_CLANG)
24     WEBKIT_ADD_TARGET_C_FLAGS(xdgmime -Wno-sign-compare
25                                       -Wno-unused-parameter)
26 endif ()