mulle-kybernetik-tv / myproject

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MulleObjCCLionDemo

🦁 An example CLion mulle-objc project

This example project is also useful as a template for new CLion projects. Follow these three steps to generate a new mulle-objc project based on the "Foundation".

1. Generate new CLion project on GitHub

On GitHub generate your own project with MulleObjCClionDemo as the template. Here we are using "myproject" as the new name.

In CLion in the welcome screen choose "Get from VCS" then enter the URL of your new project:

Welcome Screen

You should now have the project local and opened in CLion. In a fresh installation you can now configure the mulle-clang compiler.

configure

If this doesn't show up, check "File / Settings / Build Execution Deployment / ToolChains", which is the same dialog basically.

ToolChains

2. Get mulle-objc Foundation libraries

To get things to compile you need the Foundation repackaged in a special format and placed into a folder usr in your project directory. Check the "FoundationWrap" release page for possibly pre-packaged release archives. Otherwise, here is how to build and repackage the Foundation:

mulle-objc version 0.20

For this to work you need to repackage all the Objective-c libraries as well as mulle-sprintf of Foundation into FoundationWrap. Place the Foundation-startup, mulle-atinit, mulle-atexit libraries into FoundationWrap-startup. Combine all the remaining C files into a c-wrap library. Create a directory usr/include and copy all the headers recursively there. Create a directory usr/lib and copy the three libraries there.

mulle-objc version 0.21 (Future as of 1.2022) and beyond

Use FoundationWrap to create a directory usr in your project with all the required headers and libraries.

Assuming your project is called "myproject" and has been placed into ~/CLionProjects.

mulle-sde install --debug --prefix ~/CLionProjects/myproject/usr https://github.com/MulleFoundation/FoundationWrap

3. Reload CMake caches

CLion's cmake cache needs to be resetted to work with the new configuration. Chose "Tools / Cmake / Reset Cache and Reload Project"

image

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:CMake 70.8%Language:Objective-C 29.2%