24 Commits

Author SHA1 Message Date
Ariel Abreu
9d84a2a4fa
[build] Support arbitrary framework directories
This is necessary for stubs for the CoreSimulator framework (needed for
Xcode), which lives in `/Library/Developer/PrivateFrameworks`.
2023-09-25 16:28:01 -04:00
Ariel Abreu
1edcfebc27 Add ability to install individual components
This change allows you to build multiple components and still choose to
install only some of them using CMake's `cmake_install.cmake` script.
2023-05-12 10:05:41 -07:00
Ariel Abreu
1ad855c8ff Initial modular build commit
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.
2023-05-12 10:05:37 -07:00
CuriousTommy
029d33179b
Implement Support For Generating Header (#1213)
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.
2022-09-06 12:14:20 -07:00
Ariel Abreu
65f3538d3c
Merge remote-tracking branch 'origin/master' into update-sources 2020-11-10 12:19:22 -05:00
Sergey Bugaev
1d3b099708 Attempt to link more libraries using two-level namespace
See https://github.com/darlinghq/darling/issues/879
2020-10-11 19:13:46 +03:00
Thomas A
03db084961 Abstract Architecture Detection/Assignment
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.
2020-09-27 18:54:06 -07:00
Ariel Abreu
c61fb50920 Couple of improvements to the CMake helper functions
`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
2020-07-23 15:24:45 -04:00
Ariel Abreu
5a9c2b9695 Allow dependencies to be linked strongly
This is for circular libraries and frameworks that link to static libraries that other siblings depend on being available from the library
2020-07-18 20:04:43 -04:00
Ariel Abreu
cd7540563b
Allow frameworks to list upward dependencies
Also implement circular library support in add_separated_framework
2020-07-16 14:41:18 -04:00
Thomas A
38ea099870 cmake/darling_framework.cmake: Add IOSSUPPORT argument
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
2020-05-07 15:46:52 -07:00
Andrew Hyatt
d5f4e68180
Allow i386 or x86_64 only builds
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.
2019-08-13 14:29:14 -04:00
Andrew Hyatt
8df457b039 Support for nested frameworks
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)
2019-06-02 12:21:57 -04:00
Sergey Bugaev
be4b6029b9 Add support for installing framework resources 2018-06-12 16:57:44 +03:00
Sergey Bugaev
840afca584 Add a BYPRODUCTS clause to darling_framework
This fixes the ninja build of CoreFoundation
2018-05-27 08:36:22 +03:00
Andrew Hyatt
ba5323c800 Rework the separated framework function
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.
2018-01-19 21:19:16 -08:00
Andrew Hyatt
fb867cbd79 Use previous linking method for CF
Also create PlistBuddy executable
2017-08-10 23:38:09 -07:00
Andrew Hyatt
b21cacce32 Create add_separated_framework
This function is to be used when a slice of a framework
needs to be built with different flags.
2017-08-10 17:50:34 -07:00
Sergey Bugaev
79bd526650 Support circular dependencies between frameworks 2017-07-14 00:39:29 +03:00
Lubos Dolezel
12f56b4aca Extend cmake function for building frameworks to also support private frameworks 2017-04-02 22:36:02 +02:00
Lubos Dolezel
0c49468744 Correct symlink installation for framework current version 2017-03-09 14:20:36 +01:00
Lubos Dolezel
ae9c11b881 Add Python 2.7 build 2017-03-07 15:29:44 +01:00
Lubos Dolezel
0752f6b9a3 Use Apple's CoreFoundation with Apportable's additions 2017-02-22 21:29:35 +01:00
Lubos Dolezel
70a9948594 Fixing several dependency issues encountered in unclean builds 2017-02-17 18:42:35 +01:00