7
8

More than 5 years have passed since last update.

iOS用のdlibをビルドする

Last updated at Posted at 2017-12-11

概要

最新版のdlibを使いたかったためiOS用のlibdlib.aを作成しました。
そのときのメモを残します。
参考

dlibダウンロード

dlibのサイトからダウンロードします。
2017/12/11現在の最新版は19.7です

必要なものインストール

X11

cmake

brew install cmake

libdlib.aビルド用のXcodeプロジェクト作成

examplesディレクトリ内に移動し、buildディレクトリ作成、移動

cd examples
mkdir build; cd $_

下記コマンドでXcodeプロジェクトを作成します。

cmake -G Xcode ..
cmake --build . --config Release

iOS用に設定を変更する

Xcodeで開く

build/dlib_buildディレクトリにdlib.xcodeproj
ができているのでXcode 8系で開きます

(いろいろ試していたため、Xcode 9系でも良いかも)

Build Settingを変更する

dlibターゲットのBuild Settingを変更します。

項目 変更後
Base SDK Latest iOS (iOS XX.X)
Build Active Architecture Only No

Releaseビルドに変更する

dlibEdit SchemeからRunRelaseに変更します。

libdlib.a作成

▶で実行!
Release-iphoneos/libdlib.aができあがり!

7
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8