@@ -20,23 +20,17 @@ endif()
20
20
21
21
set (CMAKE_POSITION_INDEPENDENT_CODE YES )
22
22
23
-
24
- if (HAS_LIBDISPATCH_API)
25
- set (CMAKE_THREAD_PREFER_PTHREAD TRUE )
26
- set (THREADS_PREFER_PTHREAD_FLAG OFF )
27
- find_package (Threads REQUIRED)
28
- endif ()
23
+ set (CMAKE_THREAD_PREFER_PTHREAD TRUE )
24
+ set (THREADS_PREFER_PTHREAD_FLAG OFF )
25
+ find_package (Threads REQUIRED)
29
26
30
27
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
31
28
find_package (LibXml2 REQUIRED)
32
-
33
- if (BUILD_NETWORKING)
34
- find_package (CURL CONFIG)
35
- if (CURL_FOUND)
36
- set (CURL_VERSION_STRING ${CURL_VERSION} )
37
- else ()
38
- find_package (CURL REQUIRED)
39
- endif ()
29
+ find_package (CURL CONFIG)
30
+ if (CURL_FOUND)
31
+ set (CURL_VERSION_STRING ${CURL_VERSION} )
32
+ else ()
33
+ find_package (CURL REQUIRED)
40
34
endif ()
41
35
find_package (ICU COMPONENTS uc i18n REQUIRED)
42
36
endif ()
@@ -121,38 +115,6 @@ else()
121
115
set (FRAMEWORK_LIBRARY_TYPE STATIC )
122
116
endif ()
123
117
124
- set (CF_WASI_UNAVAILABLE_SOURCES)
125
-
126
- if (NOT CMAKE_SYSTEM_NAME STREQUAL WASI)
127
- list (APPEND CF_WASI_UNAVAILABLE_SOURCES
128
- # PlugIn
129
- PlugIn.subproj/CFBundle_Binary.c
130
- PlugIn.subproj/CFBundle.c
131
- PlugIn.subproj/CFBundle_DebugStrings.c
132
- PlugIn.subproj/CFBundle_Executable.c
133
- PlugIn.subproj/CFBundle_Grok.c
134
- PlugIn.subproj/CFBundle_InfoPlist.c
135
- PlugIn.subproj/CFBundle_Locale.c
136
- PlugIn.subproj/CFBundle_Main.c
137
- PlugIn.subproj/CFBundle_ResourceFork.c
138
- PlugIn.subproj/CFBundle_Resources.c
139
- PlugIn.subproj/CFBundle_SplitFileName.c
140
- PlugIn.subproj/CFBundle_Strings.c
141
- PlugIn.subproj/CFBundle_Tables.c
142
- PlugIn.subproj/CFPlugIn.c
143
- # Preferences
144
- Preferences.subproj/CFApplicationPreferences.c
145
- Preferences.subproj/CFPreferences.c
146
- Preferences.subproj/CFXMLPreferencesDomain.c
147
- # RunLoop
148
- RunLoop.subproj/CFRunLoop.c
149
- RunLoop.subproj/CFSocket.c
150
- # Stream
151
- Stream.subproj/CFConcreteStreams.c
152
- Stream.subproj/CFSocketStream.c
153
- Stream.subproj/CFStream.c)
154
- endif ()
155
-
156
118
add_framework(CoreFoundation
157
119
${FRAMEWORK_LIBRARY_TYPE}
158
120
FRAMEWORK_DIRECTORY
@@ -240,6 +202,7 @@ add_framework(CoreFoundation
240
202
Locale.subproj/CFDateInterval.h
241
203
Locale.subproj/CFLocaleInternal.h
242
204
PlugIn.subproj/CFBundlePriv.h
205
+ Stream.subproj/CFStreamPriv.h
243
206
String .subproj/CFCharacterSetPriv.h
244
207
String .subproj/CFRegularExpression.h
245
208
String .subproj/CFRunArray.h
@@ -294,7 +257,6 @@ add_framework(CoreFoundation
294
257
RunLoop.subproj/CFRunLoop.h
295
258
RunLoop.subproj/CFSocket.h
296
259
# Stream
297
- Stream.subproj/CFStreamPriv.h
298
260
Stream.subproj/CFStream.h
299
261
# String
300
262
String .subproj/CFAttributedString.h
@@ -350,11 +312,36 @@ add_framework(CoreFoundation
350
312
Parsing.subproj/CFBinaryPList.c
351
313
Parsing.subproj/CFOldStylePList.c
352
314
Parsing.subproj/CFPropertyList.c
315
+ # PlugIn
316
+ PlugIn.subproj/CFBundle_Binary.c
317
+ PlugIn.subproj/CFBundle.c
318
+ PlugIn.subproj/CFBundle_DebugStrings.c
319
+ PlugIn.subproj/CFBundle_Executable.c
320
+ PlugIn.subproj/CFBundle_Grok.c
321
+ PlugIn.subproj/CFBundle_InfoPlist.c
322
+ PlugIn.subproj/CFBundle_Locale.c
323
+ PlugIn.subproj/CFBundle_Main.c
324
+ PlugIn.subproj/CFBundle_ResourceFork.c
325
+ PlugIn.subproj/CFBundle_Resources.c
326
+ PlugIn.subproj/CFBundle_SplitFileName.c
327
+ PlugIn.subproj/CFBundle_Strings.c
328
+ PlugIn.subproj/CFBundle_Tables.c
329
+ PlugIn.subproj/CFPlugIn.c
330
+ # Preferences
331
+ Preferences.subproj/CFApplicationPreferences.c
332
+ Preferences.subproj/CFPreferences.c
333
+ Preferences.subproj/CFXMLPreferencesDomain.c
353
334
# RunLoop
354
335
# TODO(compnerd) make this empty on non-Mach targets
355
336
# RunLoop.subproj/CFMachPort.c
356
337
# RunLoop.subproj/CFMachPort_Lifetime.c
357
338
# RunLoop.subproj/CFMessagePort.c
339
+ RunLoop.subproj/CFRunLoop.c
340
+ RunLoop.subproj/CFSocket.c
341
+ # Stream
342
+ Stream.subproj/CFConcreteStreams.c
343
+ Stream.subproj/CFSocketStream.c
344
+ Stream.subproj/CFStream.c
358
345
# String
359
346
String .subproj/CFAttributedString.c
360
347
String .subproj/CFBurstTrie.c
@@ -382,9 +369,7 @@ add_framework(CoreFoundation
382
369
URL.subproj/CFURLAccess.c
383
370
URL.subproj/CFURL.c
384
371
URL.subproj/CFURLComponents.c
385
- URL.subproj/CFURLComponents_URIParser.c
386
-
387
- ${CF_WASI_UNAVAILABLE_SOURCES} )
372
+ URL.subproj/CFURLComponents_URIParser.c)
388
373
target_compile_definitions (CoreFoundation
389
374
PRIVATE
390
375
$<$<COMPILE_LANGUAGE:ASM>:CF_CHARACTERSET_BITMAP="CharacterSets/CFCharacterSetBitmaps.bitmap" >
@@ -394,27 +379,11 @@ target_compile_definitions(CoreFoundation
394
379
target_include_directories (CoreFoundation
395
380
PRIVATE
396
381
${PROJECT_SOURCE_DIR} )
397
-
398
382
target_link_libraries (CoreFoundation PRIVATE
383
+ Threads::Threads
399
384
${CMAKE_DL_LIBS}
400
- BlocksRuntime)
401
-
402
- if (HAS_LIBDISPATCH_API)
403
- target_link_libraries (CoreFoundation PRIVATE
404
- Threads::Threads
405
- dispatch)
406
- endif ()
407
-
408
- if (NOT BUILD_SHARED_LIBS )
409
- set_property (TARGET CoreFoundation PROPERTY STATIC_LIBRARY_OPTIONS
410
- $<TARGET_OBJECTS:BlocksRuntime>)
411
- endif ()
412
-
413
- if (CMAKE_SYSTEM_NAME STREQUAL WASI)
414
- # Enable emulated mman and constant CFSTRINGS
415
- target_compile_definitions (CoreFoundation PRIVATE _WASI_EMULATED_MMAN __CONSTANT_CFSTRINGS__)
416
- endif ()
417
-
385
+ BlocksRuntime
386
+ dispatch)
418
387
if (CMAKE_SYSTEM_NAME STREQUAL Android)
419
388
target_link_libraries (CoreFoundation PRIVATE
420
389
log )
@@ -453,7 +422,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
453
422
PRIVATE
454
423
CURL_STATICLIB)
455
424
endif ()
456
- if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin AND BUILD_NETWORKING )
425
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
457
426
target_link_libraries (CFURLSessionInterface PRIVATE
458
427
CURL::libcurl)
459
428
endif ()
@@ -471,8 +440,6 @@ add_framework(CFXMLInterface
471
440
SOURCES
472
441
Parsing.subproj/CFXMLInterface.c)
473
442
add_dependencies (CFXMLInterface CoreFoundation)
474
- target_link_libraries (CFXMLInterface PRIVATE BlocksRuntime)
475
-
476
443
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
477
444
target_link_libraries (CFXMLInterface PRIVATE
478
445
LibXml2::LibXml2)
@@ -527,19 +494,15 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT CMAKE_SYSTEM_NAME STREQUAL Dar
527
494
PRIVATE
528
495
m)
529
496
endif ()
530
-
531
- if (HAS_LIBDISPATCH_API)
532
- target_link_libraries (CoreFoundation
533
- PRIVATE
534
- dispatch)
535
- target_link_libraries (CFURLSessionInterface
536
- PRIVATE
537
- dispatch)
538
- target_link_libraries (CFXMLInterface
539
- PRIVATE
497
+ target_link_libraries (CoreFoundation
498
+ PRIVATE
499
+ dispatch)
500
+ target_link_libraries (CFURLSessionInterface
501
+ PRIVATE
502
+ dispatch)
503
+ target_link_libraries (CFXMLInterface
504
+ PRIVATE
540
505
dispatch)
541
- endif ()
542
-
543
506
if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
544
507
target_link_libraries (CoreFoundation
545
508
PRIVATE
0 commit comments