[Cocoa] reduce unnecessary use of .mm source files in WTF, spruce up some implementat...
[WebKit-https.git] / Source / WTF / wtf / PlatformMac.cmake
1 find_library(COCOA_LIBRARY Cocoa)
2 find_library(COREFOUNDATION_LIBRARY CoreFoundation)
3 find_library(READLINE_LIBRARY Readline)
4 list(APPEND WTF_LIBRARIES
5     ${COREFOUNDATION_LIBRARY}
6     ${COCOA_LIBRARY}
7     ${READLINE_LIBRARY}
8 )
9
10 list(APPEND WTF_PUBLIC_HEADERS
11     cf/TypeCastsCF.h
12
13     cocoa/Entitlements.h
14     cocoa/MachSendRight.h
15     cocoa/SoftLinking.h
16
17     darwin/WeakLinking.h
18
19     mac/AppKitCompatibilityDeclarations.h
20
21     spi/cf/CFBundleSPI.h
22     spi/cf/CFStringSPI.h
23
24     spi/cocoa/FoundationSPI.h
25     spi/cocoa/NSMapTableSPI.h
26     spi/cocoa/SecuritySPI.h
27
28     spi/darwin/SandboxSPI.h
29     spi/darwin/XPCSPI.h
30     spi/darwin/dyldSPI.h
31
32     text/cf/TextBreakIteratorCF.h
33 )
34
35 list(APPEND WTF_SOURCES
36     BlockObjCExceptions.mm
37     RunLoopTimerCF.cpp
38     SchedulePairCF.cpp
39     SchedulePairMac.mm
40
41     cf/LanguageCF.cpp
42     cf/RunLoopCF.cpp
43
44     cocoa/AutodrainedPool.cpp
45     cocoa/CPUTimeCocoa.cpp
46     cocoa/Entitlements.cpp
47     cocoa/MachSendRight.cpp
48     cocoa/MemoryFootprintCocoa.cpp
49     cocoa/MemoryPressureHandlerCocoa.mm
50     cocoa/WorkQueueCocoa.cpp
51
52     mac/DeprecatedSymbolsUsedBySafari.mm
53     mac/MainThreadMac.mm
54
55     text/cf/AtomicStringImplCF.cpp
56     text/cf/StringCF.cpp
57     text/cf/StringImplCF.cpp
58     text/cf/StringViewCF.cpp
59
60     text/cocoa/StringImplCocoa.mm
61     text/cocoa/StringViewCocoa.mm
62     text/cocoa/TextBreakIteratorInternalICUMac.mm
63 )
64
65 list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES
66     "${WTF_DIR}/icu"
67     ${DERIVED_SOURCES_WTF_DIR}
68 )
69
70 file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR})
71
72 add_custom_command(
73     OUTPUT
74         ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h
75         ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h
76         ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
77         ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
78     MAIN_DEPENDENCY mac/MachExceptions.defs
79     WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR}
80     COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
81     VERBATIM)
82 list(APPEND WTF_SOURCES
83     ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
84     ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
85 )
86
87 WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
88 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit DIRECTORIES ${FORWARDING_HEADERS_DIR}/WebKitLegacy)