This new build setup allows you to only build and install certain
components of Darling according to your needs. The primary motivation
for this change is to allow you to build Darling without any GUI
dependencies if you only care about or need the CLI.
JavaScriptCore is now excluded by default. This is a huge build item
that 99% of people don't need and we certainly don't use (yet).
There will be an update to the docs to describe the component options.
Implemented CMake methods for:
* Deleting the old headers before generating the new headers.
* Updating the "Developer" and "framework-include" headers.
* Generating the private frameworks headers into their proper dedicated folders ("PrivateFrameworks" and "framework-private-include")
Updated multiple frameworks to take advantage of this feature.
The main goal of this commit is to make it more easy to add or update any architecture we want to support (such as ARM64). Any changes we want to make would be done in the architectures.cmake file.
The secondary goal of this commit is to encourage a more architecture generic nomenclature. We shouldn't use i368/x86_64 unless we are dealing with code that is specific to those architectures.
`InstallSymlink.cmake`:
* Automatically create the destination directory if necessary
`darling_framework.cmake`:
* Port over some features from `add_framework` to `add_separated_framework`
* Build `add_separated_framework` sources as a fat object library used by both targets (i386 and x86_64)
* This is to reduce unnecessary recompilation
* This is fine for all the cases where we use it; we only use it to add arch-specific link flags
* If you ever want to get back the old behavior, you could add a "SEPARATE_OBJECTS" option (or something like that) to enable the old behavior
`use_ld64.cmake`:
* Update libsystem_dnssd `dylib_file` entry
Some of the frameworks that Catalyst apps rely on are located in /System/iOSSupport/System/Library/Frameworks. This argument adds the ability to install frameworks within /System/iOSSupport
Currently x86_64 or i386 only builds fail to enter shell.
CMake generation flags:
Build x86_64 only: -DTARGET_i386=OFF
Build i386 only: -DTARGET_x86_64=OFF
The default is still to build FAT binaries for both.
Reexporting is also much, much easier with the new "reexport" function too.
Fixes#521
In order to nest a framework within another, set the new PARENT argument of
the darling_framework function to be the name of the framework to nest inside
(as a string, not a target name for now)
This prevents everything that depends on
CoreFoundation from being relinked each time
Darling is built.
This was accomplished by reworking the
dependencies in order to avoid using the BYPRODUCTS
argument because that marks the output files as
GENERATED, causing CMake to build anyway
regardless of the date it was modified.