项目作者: mulle-objc

项目描述 :
🍏 Compatibility layer with Apple Objective-C runtime functions
高级语言: Objective-C
项目地址: git://github.com/mulle-objc/mulle-objc-compat.git
创建时间: 2018-08-29T14:39:59Z
项目社区:https://github.com/mulle-objc/mulle-objc-compat

开源协议:Other

下载


mulle-objc-compat

🍏 Compatibility layer with Apple Objective-C runtime functions

This library maps
Apple runtime
functions to their mulle-objc counterparts.
This makes porting of existing programs that use Apple runtime functions easier.
If you can get by with the limited set of functions, these functions are
preferable to use over their mulle-objc counterparts for the sake of portability
and familiarity.

Release Version Release Notes
Mulle kybernetiK tag Build Status RELEASENOTES

Mental model

This library

  • does not include any other runtime than mulle-objc-runtime.
  • does not define any functionality that is not part of the Apple runtime
  • does not implement everything that’s in the Apple runtime

Limitations

  • This library hasn’t been scrutinized for thread-safety.
  • Some functionality is missing that mulle-objc does not support. E.g. “weak variables”.
  • Message sending via objc_msgSend uses the mulle-objc MetaABI and therefore is only compatible in the case, where there is only one pointer sized parameter and a pointer sized return value.
  • The library must be compiled with mulle-clang (since the multiverse changes)

You are here

Overview

Requirements

Requirement Release Version Description
MulleObjC Mulle kybernetiK tag Build Status 💎 A collection of Objective-C root classes for mulle-objc

Add

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

  1. mulle-sde add github:mulle-objc/mulle-objc-compat

To only add the sources of mulle-objc-compat with dependency
sources use clib:

Legacy adds

One common denominator is that you will likely have to add
#include <mulle-objc-compat/mulle-objc-compat.h> to your source files.

Add sources to your project with clib

  1. clib install --out src/mulle-objc mulle-objc/mulle-objc-compat

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

  1. git submodule add -f --name "mulle-core" \
  2. "https://github.com/mulle-core/mulle-core.git" \
  3. "stash/mulle-core"
  4. git submodule add -f --name "mulle-objc-runtime" \
  5. "https://github.com/mulle-objc/mulle-objc-runtime.git" \
  6. "stash/mulle-objc-runtime"
  7. git submodule add -f --name "mulle-objc-debug" \
  8. "https://github.com/mulle-objc/mulle-objc-debug.git" \
  9. "stash/mulle-objc-debug"
  10. git submodule add -f --name "mulle-objc-compat" \
  11. "https://github.com/mulle-objc/mulle-objc-compat" \
  12. "stash/mulle-objc-compat"
  13. git submodule update --init --recursive
  1. add_subdirectory( stash/mulle-objc-compat)
  2. add_subdirectory( stash/mulle-objc-debug)
  3. add_subdirectory( stash/mulle-objc-runtime)
  4. add_subdirectory( stash/mulle-core)
  5. target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-compat)
  6. target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-debug)
  7. target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-objc-runtime)
  8. target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-core)

Install

Install with mulle-sde

Use mulle-sde to build and install mulle-objc-compat and all dependencies:

  1. mulle-sde install --prefix /usr/local \
  2. https://github.com/mulle-objc/mulle-objc-compat/archive/latest.tar.gz

Manual Installation

Install the Requirements and then
install mulle-objc-compat with cmake:

  1. cmake -B build \
  2. -DCMAKE_INSTALL_PREFIX=/usr/local \
  3. -DCMAKE_PREFIX_PATH=/usr/local \
  4. -DCMAKE_BUILD_TYPE=Release &&
  5. cmake --build build --config Release &&
  6. cmake --install build --config Release

Author

Nat! for Mulle kybernetiK