Push-Nachrichten von MacTechNews.de
Würden Sie gerne aktuelle Nachrichten aus der Apple-Welt direkt über Push-Nachrichten erhalten?
Forum>Entwickler>CMake-Experten gesucht

CMake-Experten gesucht

andreas_g
andreas_g27.03.2108:03
Liebe Community,

ich habe ein Projekt, das mittels CMake gebaut wird. Das funktioniert soweit ganz gut, um Binaries für die Nutzung auf meinem Mac zu erstellen. Will ich aber eine Release-Version bauen, sind einige zusätzliche Schritte erforderlich, die ich gerne automatisieren würde.

Die Anleitung mit den einzelnen Schritten ist unten angeführt. Die aktuelle CMakeLists.txt ist hier zu finden:

Vielleicht hat jemand Lust, sich das anzusehen und mir ein paar Tipps zu geben, wie das gelöst werden kann.

1. Go to source directory and build Xcode project:

# cmake -G Xcode


2. Change project settings and build:

- go to Build Settings and select Projects > Previous (not Targets)
- set "Architectures" to "Universal (32/64-bit Intel)"
- set "Build Active Architecture Only" to "No"
- set "OS X Deployment Target" to "OS X 10.6"
- select "Previous" and go to "Edit Scheme ..."
- set "Build Configuration" to "Release"
- select Product > Build


3. Add SDL framework to application bundle:

- Open application bundle and go to Contents
- Create folder "Frameworks" and copy SDL.framework into it
- Using Terminal go to bundle binary directory (MacOS) and
  change loader path for SDL:

# install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2 Previous


4. Add custom libpng to application bundle:

- Open application bundle and go to Contents
- Create folder "SharedSupport" and copy custom libpng16.16.dylib to it
- Using Terminal go to bundle binary directory (MacOS) and
  change loader path for libpng:

# install_name_tool -change /opt/local/lib/libpng16.16.dylib @executable_path/../SharedSupport/libpng16.16.dylib Previous


5. Change other loader paths:

- Using Terminal go to bundle binary directory (MacOS) and
  change loader path for SDL:

# install_name_tool -change /opt/local/lib/libz.1.dylib /usr/lib/libz.1.dylib Previous
# install_name_tool -change /usr/lib/libedit.3.dylib /usr/lib/libedit.2.dylib Previous



Customize libpng:

- Copy libpng16.16.dylib to some directory
- Go to that directory and change id and zlib loader path:

# install_name_tool -id @executable_path/../SharedSupport/libpng16.16.dylib libpng16.16.dylib
# install_name_tool -change /opt/local/lib/libz.1.dylib /usr/lib/libz.1.dylib libpng16.16.dylib
0

Kommentare

Es sind keine Einträge vorhanden.
Diese Diskussion ist bereits mehr als 3 Monate alt und kann daher nicht mehr kommentiert werden.