Skip to content

mulle-objc/MulleObjC-startup

Repository files navigation

MulleObjC-startup

▶️ Startup code for MulleObjC

This static library provides the required __register_mulle_objc_universe function for executables, that link against MulleObjC. It also bequeaths the required dependencies mulle-atinit and mulle-atexit for linking.

Use this library, if you want to create executables, that only require the MulleObjC and nothing else. Often projects will link against the Foundation though, and will use its startup library.

Release Version Release Notes
Mulle kybernetiK tag Build Status RELEASENOTES

You are here

Overview

Requirements

Requirement Release Version Description
[# MulleObjC muss no-bequeath sein, wegen dies und das](MulleObjC muss no-bequeath sein, wegen dies und das) - ▶️ Startup code for MulleObjC
MulleObjC Mulle kybernetiK tag Build Status 💎 A collection of Objective-C root classes for mulle-objc
mulle-atinit Mulle kybernetiK tag Build Status 🤱🏼 Compatibility library for deterministic initializers
mulle-atexit Mulle kybernetiK tag Build Status 👼 Compatibility library to fix atexit

Add

Use mulle-sde to add MulleObjC-startup to your project. As long as your sources are using #import "import-private.h" and your headers use #import "import.h", there will nothing more to do:

mulle-sde add github:mulle-objc/MulleObjC-startup

To only add the sources of MulleObjC-startup with dependency sources use clib:

Legacy adds

One common denominator is that you will likely have to add #import <MulleObjC-startup/MulleObjC-startup.h> to your source files.

Add sources to your project with clib

clib install --out src/mulle-objc mulle-objc/MulleObjC-startup

Add -isystem src/mulle-objc to your CFLAGS and compile all the sources that were downloaded with your project. (In cmake add include_directories( BEFORE SYSTEM src/mulle-objc) to your CMakeLists.txt file).

Add as subproject with cmake and git

git submodule add -f --name "mulle-core" \
                            "https://github.com/mulle-core/mulle-core.git" \
                            "stash/mulle-core"
git submodule add -f --name "mulle-objc-runtime" \
                            "https://github.com/mulle-objc/mulle-objc-runtime.git" \
                            "stash/mulle-objc-runtime"
git submodule add -f --name "mulle-objc-debug" \
                            "https://github.com/mulle-objc/mulle-objc-debug.git" \
                            "stash/mulle-objc-debug"
git submodule add -f --name "mulle-atinit" \
                            "https://github.com/mulle-core/mulle-atinit.git" \
                            "stash/mulle-atinit"
git submodule add -f --name "mulle-atexit" \
                            "https://github.com/mulle-core/mulle-atexit.git" \
                            "stash/mulle-atexit"
git submodule add -f --name "MulleObjC-startup" \
                            "https://github.com/mulle-objc/MulleObjC-startup" \
                            "stash/MulleObjC-startup"
git submodule update --init --recursive
add_subdirectory( stash/MulleObjC-startup)
add_subdirectory( stash/mulle-atexit)
add_subdirectory( stash/mulle-atinit)
add_subdirectory( stash/mulle-objc-debug)
add_subdirectory( stash/mulle-objc-runtime)
add_subdirectory( stash/mulle-core)

target_link_libraries( ${PROJECT_NAME} PUBLIC MulleObjC-startup)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-atexit)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-atinit)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-debug)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-runtime)
target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-core)

Install

Install with mulle-sde

Use mulle-sde to build and install MulleObjC-startup and all dependencies:

mulle-sde install --prefix /usr/local \
   https://github.com/mulle-objc/MulleObjC-startup/archive/latest.tar.gz

Manual Installation

Install the Requirements and then install MulleObjC-startup with cmake:

cmake -B build \
      -DCMAKE_INSTALL_PREFIX=/usr/local \
      -DCMAKE_PREFIX_PATH=/usr/local \
      -DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config Release

Author

Nat! for Mulle kybernetiK