Build Enviroment Setup on Apple OS X


The 3D Photography software is written in C++. In order to compile and run the software on you computer you must have a working compiler, Qt 5.10, and Cmake 3.10. In this section we will guide you to setup your enviroment.

1   Compiler: Xcode

In Apple OS X we wil use Xcode to compile the software. Install Xcode from the Apple Store.

Open Xcode and agree to install additional components if you are presented with this screen.

1.1   Xcode command line tools

Next install the Xcode command line tools by opening a 'Terminal' window and typing:

    xcode-select --install

Click 'Install' to begion the installation process.

2   Cmake

Download and open Cmake 3.5.0. Accept the license and copy Cmake to the Application folder using drag and drop.

3   Qt Framework

The 3D Photography software is based on the Qt Framework. Download an open Qt 5.6.0. Look at the following screenshots as reference of the installation process.

Feel free to click 'Skip' at the screen asking for a Qt account.

4   Building and running the 3D Photography software

Donwload the source code and unzip it to a work folder (e.g. ~/3dp). Open Cmake GUI and fill the 'Where is the source code' box with the path the the 'src' directory in the code folder. Fill the box below, the build path, with the same path but erase 'src' and write 'build' instead, it should look similar to this:

Click on 'Configure' and agree to create the build directory. On the next screen choose to use the 'Xcode' generator. The configuration script will run and finish with an error message because we have yet not set the location of some Qt modules.

Check the 'Group' and 'Advanced' checkboxes to organize the options. Expand the 'Ungrouped entries' and fill the path for each Qt5 module which appears as DIR_NOTFOUND. For each module you must point Cmake to the directory with the corresponding Cmake files. For the default installation these are:

Repeat 'Configure' and fix errors until no more error messages appear. Click on 'Generate' to create an Xcode project and close Cmake.

Browse the newly created 'build' directory in a Finder window and double-click '3dp-course-app.xcodeproj' to open Xcode. Once the project is loaded click over 'ALL_BUILD' at the top and change to '3dp-course-app'.

Compile and run the software clicking on the black triangle at the toolbar. You will find the 'homework1.cpp' file on the projecttree at the left to complete your homework.