[CMake] Make WTF headers copies
[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_HEADERS
11     cf/TypeCastsCF.h
12
13     cocoa/SoftLinking.h
14
15     darwin/WeakLinking.h
16
17     mac/AppKitCompatibilityDeclarations.h
18
19     spi/cf/CFBundleSPI.h
20     spi/cf/CFStringSPI.h
21
22     spi/cocoa/NSMapTableSPI.h
23     spi/cocoa/SecuritySPI.h
24
25     spi/darwin/CommonCryptoSPI.h
26     spi/darwin/SandboxSPI.h
27     spi/darwin/XPCSPI.h
28     spi/darwin/dyldSPI.h
29
30     text/cf/TextBreakIteratorCF.h
31 )
32
33 list(APPEND WTF_SOURCES
34     AutodrainedPoolMac.mm
35     BlockObjCExceptions.mm
36     RunLoopTimerCF.cpp
37     SchedulePairCF.cpp
38     SchedulePairMac.mm
39
40     cf/LanguageCF.cpp
41     cf/RunLoopCF.cpp
42
43     text/mac/TextBreakIteratorInternalICUMac.mm
44
45     cocoa/CPUTimeCocoa.mm
46     cocoa/MemoryFootprintCocoa.cpp
47     cocoa/MemoryPressureHandlerCocoa.mm
48     cocoa/WorkQueueCocoa.cpp
49
50     mac/DeprecatedSymbolsUsedBySafari.mm
51     mac/MainThreadMac.mm
52
53     text/cf/AtomicStringImplCF.cpp
54     text/cf/StringCF.cpp
55     text/cf/StringImplCF.cpp
56     text/cf/StringViewCF.cpp
57
58     text/mac/StringImplMac.mm
59     text/mac/StringMac.mm
60     text/mac/StringViewObjC.mm
61 )
62
63 list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES
64     "${WTF_DIR}/icu"
65     "${WTF_DIR}/wtf/spi/darwin"
66     ${DERIVED_SOURCES_WTF_DIR}
67 )
68
69 file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR})
70
71 add_custom_command(
72     OUTPUT
73         ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h
74         ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h
75         ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
76         ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
77     MAIN_DEPENDENCY mac/MachExceptions.defs
78     WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR}
79     COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
80     VERBATIM)
81 list(APPEND WTF_SOURCES
82     ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
83     ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
84 )
85
86 WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
87 WEBKIT_CREATE_FORWARDING_HEADERS(WebKit DIRECTORIES ${FORWARDING_HEADERS_DIR}/WebKitLegacy)