 * Compile Instructions - Mac OS X *


Building nomacs on Mac is a little bit tricky because most of dependecy libraries
are not part of the system by default.

For end users is always recommended to use Nomacs as a binary application from the
project website: http://nomacs.org


You can:
1) install all required libraries manually (it usually means download it, unpack it, and compile)
or
2) use some mac packaging system. I use Macports.


Roor requirements:
 - Qt4
 - libraw
 - libexiv2
 - opencv suite
 - cmake
 - C/C++ compiler


Building routine is developed and tested to be used *without* XCode. So only terminal is used.

1) Download Nomacs sources (tarbal or SVN). Unpack it if necessary.

   mkdir nomacs
   cd nomacs
   svn checkout svn://svn.code.sf.net/p/nomacs/svn/trunk/ImageLounge nomacs-svn

2) Create some additional directory for so called "out of source build" so following
   directory tree will be created:

   mkdir build
   ls -l

    - build
    - nomacs-svn

3) configure it in the build directory

   cd build
   cmake ../nomacs-svn [arguments]

   where arguments can be any of varaibles described in cmake documentation. Mostly used are:
    -DCMAKE_INSTALL_PREFIX=../release
    -DCMAKE_BUILD_TYPE=release
    -DCMAKE_OSX_ARCHITECTURES="i386;x86_64;" (note that all depencies *must* be copiled with these architectures)

   for example this code will configure nomacs for your default architecture and install the binaries
   into "release" directory in the same level as is current "build" one.
     cmake -DCMAKE_INSTALL_PREFIX=../release -DCMAKE_BUILD_TYPE=debug ../nomacs-svn 

4) compile it

   make

5) install it - don't forget that this command will not install it into your /Applications directory.
   Nomacs application bundle will be created in the CMAKE_INSTALL_PREFIX directory.

   make install

   now there is new directory in our environment:
    - build
    - nomacs-svn
    - release
      - nomacs.app ...

6) optional: make a independent application bundle containing all required libraries for
   redistribution.

   make bundle

6.1) pack it or create dmg with any tool
     Universal bundles can be stripped by provided script macosx/strip_bundle.sh


