Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6869b4b

Browse files
authoredMar 8, 2024
Merge pull request #4912 from kateinoigakukun/pr-f937fe8e72fee42afb2f55776bf64ea23359ad95
[wasm] Port CoreFoundation/CMakeLists.txt
2 parents eded784 + dc551c7 commit 6869b4b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎CoreFoundation/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ add_framework(CFXMLInterface
479479
SOURCES
480480
Parsing.subproj/CFXMLInterface.c)
481481
add_dependencies(CFXMLInterface CoreFoundation)
482+
if(NOT HAS_LIBDISPATCH_API)
483+
# Explicitly link BlocksRuntime if we are not using libdispatch, which
484+
# indirectly brings BlocksRuntime in.
485+
target_link_libraries(CFXMLInterface PRIVATE BlocksRuntime)
486+
endif()
482487
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
483488
target_link_libraries(CFXMLInterface PRIVATE
484489
LibXml2::LibXml2)
@@ -561,6 +566,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
561566
-Xlinker;-alias_list;-Xlinker;Base.subproj/DarwinSymbolAliases;-twolevel_namespace;-sectcreate;__UNICODE;__csbitmaps;CharacterSets/CFCharacterSetBitmaps.bitmap;-sectcreate;__UNICODE;__properties;CharacterSets/CFUniCharPropertyDatabase.data;-sectcreate;__UNICODE;__data;CharacterSets/CFUnicodeData-L.mapping;-segprot;__UNICODE;r;r)
562567
endif()
563568

569+
if(CMAKE_SYSTEM_NAME STREQUAL WASI)
570+
# Enable emulated features
571+
set(WASI_EMULATION_DEFS _WASI_EMULATED_MMAN _WASI_EMULATED_SIGNAL _WASI_EMULATED_PROCESS_CLOCKS)
572+
target_compile_definitions(CoreFoundation PRIVATE ${WASI_EMULATION_DEFS})
573+
target_compile_definitions(CFXMLInterface PRIVATE ${WASI_EMULATION_DEFS})
574+
endif()
575+
564576
install(TARGETS
565577
CoreFoundation
566578
CFXMLInterface

0 commit comments

Comments
 (0)
Please sign in to comment.