3542fef6f90ee0a65891b3a37606545c9ac77c41
[WebKit-https.git] / Source / WTF / wtf / PlatformJSCOnly.cmake
1 list(APPEND WTF_SOURCES
2     generic/WorkQueueGeneric.cpp
3 )
4
5 if (WIN32)
6     list(APPEND WTF_SOURCES
7         text/win/TextBreakIteratorInternalICUWin.cpp
8
9         win/CPUTimeWin.cpp
10         win/DbgHelperWin.cpp
11         win/FileSystemWin.cpp
12         win/LanguageWin.cpp
13         win/MainThreadWin.cpp
14         win/OSAllocatorWin.cpp
15         win/PathWalker.cpp
16         win/ThreadSpecificWin.cpp
17         win/ThreadingWin.cpp
18     )
19     list(APPEND WTF_PUBLIC_HEADERS
20         win/DbgHelperWin.h
21         win/PathWalker.h
22
23         text/win/WCharStringExtras.h
24     )
25     list(APPEND WTF_LIBRARIES
26         DbgHelp
27         shlwapi
28         winmm
29     )
30 else ()
31     list(APPEND WTF_SOURCES
32         UniStdExtras.cpp
33
34         generic/MainThreadGeneric.cpp
35
36         posix/FileSystemPOSIX.cpp
37         posix/OSAllocatorPOSIX.cpp
38         posix/ThreadingPOSIX.cpp
39
40         text/unix/TextBreakIteratorInternalICUUnix.cpp
41
42         unix/LanguageUnix.cpp
43     )
44     if (WTF_OS_FUCHSIA)
45         list(APPEND WTF_SOURCES
46             fuchsia/CPUTimeFuchsia.cpp
47         )
48     else ()
49         list(APPEND WTF_SOURCES
50             unix/CPUTimeUnix.cpp
51         )
52     endif ()
53 endif ()
54
55 if (WIN32)
56     list(APPEND WTF_SOURCES
57         win/MemoryFootprintWin.cpp
58     )
59     list(APPEND WTF_PUBLIC_HEADERS
60         win/Win32Handle.h
61     )
62 elseif (APPLE)
63     file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR})
64     add_custom_command(
65         OUTPUT
66             ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h
67             ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h
68             ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
69             ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
70         MAIN_DEPENDENCY mac/MachExceptions.defs
71         WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR}
72         COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
73         VERBATIM)
74     list(APPEND WTF_SOURCES
75         cocoa/MemoryFootprintCocoa.cpp
76         ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
77         ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
78     )
79     list(APPEND WTF_INCLUDE_DIRECTORIES
80         ${DERIVED_SOURCES_WTF_DIR}
81     )
82 elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
83     list(APPEND WTF_SOURCES
84         linux/CurrentProcessMemoryStatus.cpp
85         linux/MemoryFootprintLinux.cpp
86         linux/MemoryPressureHandlerLinux.cpp
87     )
88     list(APPEND WTF_PUBLIC_HEADERS
89         linux/CurrentProcessMemoryStatus.h
90     )
91 else ()
92     list(APPEND WTF_SOURCES
93         generic/MemoryFootprintGeneric.cpp
94         generic/MemoryPressureHandlerGeneric.cpp
95     )
96 endif ()
97
98 if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
99     list(APPEND WTF_SOURCES
100         glib/GRefPtr.cpp
101         glib/RunLoopGLib.cpp
102     )
103     list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
104         ${GLIB_INCLUDE_DIRS}
105     )
106     list(APPEND WTF_LIBRARIES
107         ${GLIB_GIO_LIBRARIES}
108         ${GLIB_GOBJECT_LIBRARIES}
109         ${GLIB_LIBRARIES}
110     )
111 else ()
112     list(APPEND WTF_SOURCES
113         generic/RunLoopGeneric.cpp
114     )
115 endif ()
116
117 list(APPEND WTF_LIBRARIES
118     ${CMAKE_THREAD_LIBS_INIT}
119 )
120
121 if (APPLE)
122     list(APPEND WTF_INCLUDE_DIRECTORIES
123         "${WTF_DIR}/icu"
124     )
125 endif ()