Skip to content

Making an SDK (OS X)

joeykleingers edited this page Jul 11, 2017 · 7 revisions

These prerequisites need to be completed before making a DREAM.3D SDK.

If you have already fulfilled all of these prerequisites, skip to the Procedure section.

A compatible compiler needs to be installed on your system to be able to build DREAM.3D.

For more information, please visit Installing a Compiler Suite.

Procedure

Basic Setup

1: Create a folder called DREAM3D_SDK in the /Users/Shared folder

2: Download and install CMake from https://cmake.org/download:

Scroll down the page until you see the Latest Release section. The latest release may be a higher version than 3.7.2. Press the download link to download the tar.gz file of the latest release of CMake. Again, the latest release may be a higher version than 3.8.2 but that is ok.

Click on the tar.gz file that you just downloaded to expand it into a folder.

Move the newly expanded folder into the DREAM3D_SDK folder that we created earlier.

3: Download and install the "Ninja" build system from https://github.com/ninja-build/ninja/releases:

Press the download link to download the ninja-mac.zip file. Click on the zip file that you just downloaded to expand it into the ninja executable.

Place the executable in /usr/local/bin.

4: Download and install Doxygen from http://www.stack.nl/~dimitri/doxygen/download.html:

Scroll down until you see the Sources and Binaries section. Press the http download link to download the .dmg file of the latest release of Doxygen.

Open the .dmg file and copy the app into /Applications. You may need admin privileges on your computer to complete this step.

5: Download and install Xcode from the App Store located at /Applications/App Store.app After Xcode has been downloaded and installed, open it so that Xcode Command Line Tools will be installed. You CANNOT continue with setup until Xcode Command Line Tools has been installed!

Clone Repository

Create a folder called Workspace in your home directory, and then use git to clone the DREAM.3D Superbuild repository at https://github.com/bluequartzsoftware/DREAM3DSuperbuild to the Workspace folder that you just created.

git clone https://github.com/bluequartzsoftware/DREAM3DSuperbuild.git

Instructions

  1. Open CMake and set the Where is the source code path to /Users/[YOUR-HOME-FOLDER]/Workspace/DREAM3DSuperbuild.

  2. Set the Where to build the binaries path to /Users/[YOUR-HOME-FOLDER]/Workspace/Builds/DREAM3DSuperbuild-Build/Debug.

  3. We are going to create a CMake variable. Press the Add Entry button.

  4. Set the Name to DREAM3D_SDK. Set the Type to PATH and set the Value to the location of the DREAM3D_SDK folder that we created earlier (/Users/Shared/DREAM3D_SDK)

  5. Repeat steps 3 & 4, except set Name to CMAKE_MAKE_PROGRAM, Type to FILEPATH, and Value to the path to our ninja executable that we added earlier (/usr/local/bin/ninja).

  6. You should now have two variables, DREAM3D_SDK and CMAKE_MAKE_PROGRAM.

  7. Press the Configure button in CMake. At this point, Qt 5 will be automatically downloaded and installed. Since the Qt download is over 1 GB in size, this may take some time so please be patient. Sometimes there is a pause between the download completing and the installer popping up, so just wait a minute or so for the installer to appear.

  8. When the installer is finished, make sure that CMAKE_BUILD_TYPE is set to Debug.

  9. Press the Configure button in CMake again.

  10. Press the Generate button in CMake to generate the build files.

  11. Repeat steps 1-10, except use path /Users/[YOUR-HOME-FOLDER]/Workspace/Builds/DREAM3DSuperbuild-Build/Release for step 2 and set CMAKE_BUILD_TYPE to Release in step 8.

    Note: Although you still need to press Configure in step 7, Qt will not download or install again because it was already downloaded and installed the first time through.

  12. Open Terminal, and navigate to /Users/[YOUR-HOME-FOLDER]/Workspace/Builds/DREAM3DSuperbuild-Build/Debug.

  13. Execute the command:

    ninja

    It will build the Debug version of the SDK. Please be patient, it takes a while to build all the dependent libraries.

  14. When the Debug version of the SDK is done building, navigate to /Users/[YOUR-HOME-FOLDER]/Workspace/Builds/DREAM3DSuperbuild-Build/Release.

  15. Execute the command:

    ninja

    It will build the Release version of the SDK. Please be patient, it takes a while to build all the dependent libraries.

  16. Navigate to /Users/Shared/DREAM3D_SDK. This is your newly created SDK and can be used to compile DREAM.3D.

Additional Notes

The procedure above builds the following libraries:

  • Boost version 1.60.0
  • Doxygen (1.8.11) (Download and install only)
  • Eigen verison 3.2.9
  • HDF5 Version 1.8.16
  • ITK version 4.9.1
  • Protocol Buffers 2.6.1
  • Qt version 5.6.2
  • Qwt version 6.1.3
  • TBB version tbb44_20160524oss

Next Page: Downloading the DREAM.3D Source Code.

Previous Page: Installing a Compiler Suite.