Building on Apple macOS
CMake and git can be installed using Homebrew. Follow the instructions at the link to install Homebrew and then run:
$ brew install git $ brew install cmake
First choose a directory to work in, this is where the code will be checked out and built. This directory will be referred to as $DJV_BUILD in the rest of the documentation.
Append your PATH and DYLD_LIBRARY_PATH environment variables:
$ cd $DJV_BUILD $ export PATH=$PWD/DJV-install-Debug/bin:$PATH $ export DYLD_LIBRARY_PATH=$PWD/DJV-install-Debug/lib:$DYLD_LIBRARY_PATH
Open a shell, go to the build directory, and clone the DJV repository:
$ cd $DJV_BUILD $ git clone https://github.com/darbyjohnston/DJV.git
Build the third party dependencies:
$ mkdir DJV-third-party-Debug $ cd DJV-third-party-Debug $ cmake ../DJV/third-party -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../DJV-install-Debug -DCMAKE_FIND_FRAMEWORK="LAST" $ cmake --build . $ cmake --build . --target install $ cd ..
Build DJV:
$ mkdir DJV-Debug $ cd DJV-Debug $ cmake ../DJV -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../DJV-install-Debug -DCMAKE_PREFIX_PATH=../DJV-install-Debug -DCMAKE_FIND_FRAMEWORK="LAST" $ cmake --build .
Try running the confidence tests to make sure everything is working OK:
$ cmake --build . --target test
Run the djv player application:
$ ./build/bin/djv
The following steps describe how to pacakge DJV.
Create a release build:
$ cd $BUILD_DIR $ export PATH=$PWD/DJV-install-Release/bin:$PATH $ export DYLD_LIBRARY_PATH=$PWD/DJV-install-Release/lib:$DYLD_LIBRARY_PATH $ mkdir DJV-third-party-Release $ cd DJV-third-party-Release $ cmake ../DJV/third-party -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../DJV-install-Release -DCMAKE_FIND_FRAMEWORK="LAST" $ cmake --build . $ cmake --build . --target install $ cd .. $ mkdir DJV-Release $ cd DJV-Release $ cmake ../DJV -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../DJV-install-Release -DCMAKE_PREFIX_PATH=../DJV-install-Release -DCMAKE_FIND_FRAMEWORK="LAST" $ cmake --build .
Build the package:
$ cmake ../DJV -DDJV_THIRD_PARTY=TRUE $ cmake --build . $ cmake --build . --target package