Progress towards CMake on Windows and Mac.
[WebKit-https.git] / Source / cmake / OptionsWindows.cmake
1 add_definitions(-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DUNICODE)
2
3 #FIXME: Make sure these are the same as the Windows feature defines once we get CMake working on Windows.
4 WEBKIT_OPTION_BEGIN()
5 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT ON)
6 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_VENDOR_PREFIXES OFF)
7 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PICTURE_SIZES ON)
8 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PROMISES OFF)
9 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIEW_MODE_CSS_MEDIA OFF)
10 WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC ON)
11 WEBKIT_OPTION_END()
12
13 include_directories("$ENV{WEBKIT_LIBRARIES}/include")
14 link_directories("$ENV{WEBKIT_LIBRARIES}/lib$(PlatformArchitecture)")
15 if (MSVC)
16     add_definitions(
17         /wd4018 /wd4068 /wd4099 /wd4100 /wd4127 /wd4138 /wd4146 /wd4180 /wd4189 /wd4201 /wd4244 /wd4251 /wd4267 /wd4275 /wd4288
18         /wd4291 /wd4305 /wd4309 /wd4344 /wd4355 /wd4389 /wd4396 /wd4481 /wd4503 /wd4505 /wd4510 /wd4512 /wd4530 /wd4610 /wd4702
19         /wd4706 /wd4800 /wd4819 /wd4951 /wd4952 /wd4996 /wd6011 /wd6031 /wd6211 /wd6246 /wd6255 /wd6387
20         /MP
21     )
22
23     string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
24     string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
25 endif ()
26
27 set(PORT Win)
28 set(JavaScriptCore_LIBRARY_TYPE SHARED)
29 set(WTF_LIBRARY_TYPE SHARED)
30 set(ICU_LIBRARIES libicuuc$(DebugSuffix) libicuin$(DebugSuffix))