OSX Build Notes

Setup:

~/dev/b: build location for all dependencies (run cmake ../krita/3rdparty in /dev/b)
~/dev/d: download location for all dependencies
~/dev/i: install location for all dependencies
~/dev/build: manual build location
~/dev/krita: source checkout

deploy.sh: for creating the krita.app bundle

cmake command to configure krita:

cmake ../krita \
     -DCMAKE_PREFIX_PATH=$HOME/dev/i \
     -DCMAKE_LIBRARY_PATH=$HOME/dev/i/lib \
     -Wno-dev \
     -DCMAKE_INSTALL_PREFIX=$HOME/dev/i \
     -DBUILD_TESTING=OFF \
     -DDEFINE_NO_DEPRECATED=1 \
     -DBUILD_doc=FALSE \
     -DBUNDLE_INSTALL_DIR=$HOME/dev/i/bin


cmake command to configure the ext projects     
     
cmake ../krita/3rdparty/ -DCMAKE_INSTALL_PREFIX=$HOME/dev/i/ -DEXTERNALS_DOWNLOAD_DIR=$HOME/dev/d/ -DINSTALL_ROOT=$HOME/dev/i/

cmake line for qt creator

-DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DDEFINE_NO_DEPRECATED=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/dev/i -DCMAKE_INCLUDE_PATH=$HOME/dev/i/include -DQT_QMAKE_EXECUTABLE=$HOME/dev/i/bin/qmake -DCMAKE_PREFIX_PATH=$HOME/dev/i

rm -rf ~/krita.app/
rm -rf ~/krita.dmg
cp -r ~/dev/i/bin/krita.app ~
cp -r ~/dev/i/share ~/krita.app/Contents/
macdeployqt ~/krita.app \
    -verbose=1 \
    -extra-plugins=$HOME/dev/i/lib/kritaplugins/ \
    -extra-plugins=$HOME/dev/i/lib/kf5/ \
    -extra-plugins=$HOME/dev/i/lib/plugins/ \
    -extra-plugins=$HOME/dev/i/plugins/ \
    -dmg
mkdir ~/krita.app/Contents/PlugIns/kritaplugins
mv ~/krita.app/Contents/PlugIns/*so ~/krita.app/Contents/PlugIns/kritaplugins

To make open_exr build, manual step after it fails because dwalookups cannot find Half:
install_name_tool -add_rpath /Users/boud/dev/i/lib /Users/boud/dev/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./b44ExpLogTable 
install_name_tool -add_rpath /Users/boud/dev/i/lib /Users/boud/dev/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./dwaLookups
