-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Ship a .framework version of Mono #53370
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
Changes from all commits
3d876f7
ada980d
82555d5
4879ec7
9e3bc17
ff168f9
f97e186
0ee1330
7d8d578
e97ec4c
f16eabb
75ea8d1
9bd0b0e
4ee0938
45f4e2b
3315ef6
8f544ab
db386ee
aa31a96
62ab8ae
2837fcb
65e00a7
29e9413
bd8272e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -381,6 +381,47 @@ if(NOT DISABLE_SHARED_LIBS) | |
| add_library(monosgen-shared-dac SHARED "mini-windows-dlldac.c") | ||
| set_target_properties(monosgen-shared-dac PROPERTIES OUTPUT_NAME ${MONO_SHARED_LIB_NAME}-dac) | ||
| endif() | ||
|
|
||
| if(BUILD_DARWIN_FRAMEWORKS) | ||
| if(TARGET_DARWIN) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we should never build a .framework in the case of .dylib components? Didn't you say iOS Simulator should ship dylibs & build against stubs in #53370 (comment) ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I meant to me this looks like the code only supports the static components case. I assumed a dynamic components version will be added in a follow-up PR. Maybe I misunderstood what's happening here. |
||
| # In cmake, you cannot have list entries which contain a space or semicolon - those are considered | ||
| # record separators (i.e. a list of list(APPEND foo "a" "b;c" "d e") is a five entry list of values | ||
| # a, b, c, d and e. | ||
| # So, in order to treat the components lists as single list entries, swap out the ; character | ||
| # for a temporary replacement character, allowing the full lists to be treated as single entries | ||
| string(REPLACE ";" "*" mono-components-objects-nowhitespace "${mono-components-objects}") | ||
directhex marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| string(REPLACE ";" "*" mono-components-stub-objects-nowhitespace "${mono-components-stub-objects}") | ||
| list(APPEND FrameworkConfig Mono.debug Mono.release) | ||
| list(APPEND ComponentsObjects "${mono-components-objects-nowhitespace}" "${mono-components-stub-objects-nowhitespace}") | ||
| foreach(frameworkconfig componentsobjects IN ZIP_LISTS FrameworkConfig ComponentsObjects) | ||
| if("${componentsobjects}" STREQUAL "") | ||
| #components list is empty, use stubs instead | ||
| set(componentsobjects "${mono-components-stub-objects-nowhitespace}") | ||
| endif() | ||
| add_library(${frameworkconfig} SHARED $<TARGET_OBJECTS:monosgen-objects>) | ||
| target_compile_definitions(${frameworkconfig} PRIVATE -DMONO_DLL_EXPORT) | ||
| target_sources(${frameworkconfig} PRIVATE $<TARGET_OBJECTS:eglib_objects>) | ||
| target_link_libraries(${frameworkconfig} PRIVATE ${OS_LIBS} ${ICONV_LIB} ${LLVM_LIBS} ${ICU_LIBS}) | ||
| if(ICU_LDFLAGS) | ||
| set_property(TARGET ${frameworkconfig} APPEND_STRING PROPERTY LINK_FLAGS " ${ICU_LDFLAGS}") | ||
| endif() | ||
| if(STATIC_ICU) | ||
| set_property(TARGET ${frameworkconfig} APPEND_STRING PROPERTY LINKER_LANGUAGE CXX) | ||
| endif () | ||
| set_property(TARGET ${frameworkconfig} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-compatibility_version -Wl,2.0 -Wl,-current_version -Wl,2.0") | ||
| string(REPLACE "*" ";" componentsobjects-whitespace "${componentsobjects}") | ||
| target_sources(${frameworkconfig} PRIVATE "${componentsobjects-whitespace}") | ||
| set_target_properties(${frameworkconfig} PROPERTIES | ||
| FRAMEWORK TRUE | ||
| FRAMEWORK_VERSION C | ||
| MACOSX_FRAMEWORK_IDENTIFIER net.dot.mono-framework | ||
| ) | ||
| install(TARGETS ${frameworkconfig} | ||
| FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
| ) | ||
| endforeach() | ||
| endif() | ||
| endif() | ||
| endif() | ||
|
|
||
| find_package(Python3 COMPONENTS Interpreter) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.