Skip to content

[wasm] Port CoreFoundation/CMakeLists.txt #4912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CoreFoundation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,11 @@ add_framework(CFXMLInterface
SOURCES
Parsing.subproj/CFXMLInterface.c)
add_dependencies(CFXMLInterface CoreFoundation)
if(NOT HAS_LIBDISPATCH_API)
# Explicitly link BlocksRuntime if we are not using libdispatch, which
# indirectly brings BlocksRuntime in.
target_link_libraries(CFXMLInterface PRIVATE BlocksRuntime)
endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(CFXMLInterface PRIVATE
LibXml2::LibXml2)
Expand Down Expand Up @@ -561,6 +566,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
-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)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL WASI)
# Enable emulated features
set(WASI_EMULATION_DEFS _WASI_EMULATED_MMAN _WASI_EMULATED_SIGNAL _WASI_EMULATED_PROCESS_CLOCKS)
target_compile_definitions(CoreFoundation PRIVATE ${WASI_EMULATION_DEFS})
target_compile_definitions(CFXMLInterface PRIVATE ${WASI_EMULATION_DEFS})
endif()

install(TARGETS
CoreFoundation
CFXMLInterface
Expand Down