-
-
Notifications
You must be signed in to change notification settings - Fork 133
Building on OS X
lalinsky edited this page May 8, 2011
·
3 revisions
Various scenarios when building Chromaprint on Mac OS X.
You can build an Universal Binary framework with Mac OS X 10.4 as the deployment target using the following commands:
$ cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_FRAMEWORK=ON \
-DCMAKE_C_COMPILER=/usr/bin/gcc-4.0 \
-DCMAKE_CXX_COMPILER=/usr/bin/c++-4.0 \
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk/ \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 \
-DCMAKE_OSX_ARCHITECTURES="ppc;i368;x86_64"
$ make
$ make install
If you want to build for 10.5 or newer, you use the default compiler:
$ cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_FRAMEWORK=ON \
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk/ \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.5 \
-DCMAKE_OSX_ARCHITECTURES="ppc;i368;x86_64"
$ make
$ make install
Again, we want an Universal Binary framework that works on 10.4:
$ cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=/usr/bin/gcc-4.0 \
-DCMAKE_CXX_COMPILER=/usr/bin/c++-4.0 \
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk/ \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 \
-DCMAKE_OSX_ARCHITECTURES="ppc;i368;x86_64" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_EXAMPLES=ON \
-DFFMPEG_ROOT=~/code/install/
$ make