Difference between revisions of "Compiling/XCode"

Line 7: Line 7:
 
== Obtain Dev Tools ==
 
== Obtain Dev Tools ==
  
Download the latest version of [http://www.cmake.org/cmake/resources/software.html CMake for Mac OS X]. Once downloaded, follow the instructions to install CMake and be sure to select the box for installing the CMake developer tools:
+
Download the latest version of [http://www.cmake.org/cmake/resources/software.html CMake for Mac OS X]. Once downloaded, follow the instructions to install CMake and be sure to select the box for installing the CMake Command Line tools:
  
Also, during installation, be sure CMake Command Line tools are installed.
+
[[Image:CMakeCommandLineTools.png|none|430px|]]
 
+
[[Image:CMakeCommandLineTools.png]]
+
  
 
The latest version of the BRL-CAD source is also required, which can be obtained  [https://sourceforge.net/projects/brlcad/files/BRL-CAD%20Source/ here].
 
The latest version of the BRL-CAD source is also required, which can be obtained  [https://sourceforge.net/projects/brlcad/files/BRL-CAD%20Source/ here].
Line 19: Line 17:
 
[[Image:XcodeCommandLineTools.png]]
 
[[Image:XcodeCommandLineTools.png]]
  
 +
== Compiling ==
  
 +
Navigate to the BRL-CAD source directory you downloaded and create a new folder titled "brlcad-build." This is where we will store the configured build:
  
and want to see if you need to install them, you can check in Xcode Preferences > Downloads??
+
[[Image:BrlcadFolder.png]]
  
== Compiling ==
+
Open Terminal (in /User/Applications/Utilities) and cd to the location of the BRL-CAD source folder (Note: you can type cd, press the spacebar, and then drag the brlcad folder to copy its search path):
 
+
Open Terminal (in /User/Applications/Utilities) and cd to the location of the brl-cad source folder:
+
  
 
   cd brlcad
 
   cd brlcad
  
Create a new folder called "brlcad-build," which is where we will store the configured CMake build. We will then need CMake to compile the build:
+
Now, we will need to configure the source files and install them (Note: this may take some time):
  
 
   cd brlcad-build
 
   cd brlcad-build
 
   cmake ..
 
   cmake ..
 +
  sudo make install
  
Install the CMake configuration:
+
We can now build a BRL-CAD xcode project that we can use to compile BRL-CAD. Be sure to cd to the brlcad-x.y.z and run the following command:
  
  sudo make install
+
[[Image:XcodeTerminalCommand.png]]
  ls -la /usr/brlcad
+
  /usr/brlcad/*/bin/mged
+
  
Run to compile a working Xcode BRL-CAD Project:
+
{|align="right"
 +
|[[Image:XcodeBRLCADProject.png|thumb|256px|The Xcode project file that should result.]]
 +
|}

Revision as of 22:07, 30 November 2012

Compiling BRL-CAD with Xcode on Mac OS X

THIS GUIDE IS CURRENTLY UNDER CONSTRUCTION

An already built and running version of BRL-CAD for Mac OS X can be downloaded from here, or these steps will guide you through the process of how to compiling it yourself.

Obtain Dev Tools

Download the latest version of CMake for Mac OS X. Once downloaded, follow the instructions to install CMake and be sure to select the box for installing the CMake Command Line tools:

CMakeCommandLineTools.png

The latest version of the BRL-CAD source is also required, which can be obtained here.

You will also need Xcode, which can be downloaded from the Mac App Store. When installing, make sure you install the unix development command-line tools. Or if Xcode is already installed on your system, you can install the command line tools (or double-check to make sure you have them) by navigating to Xcode Preferences > Downloads and in the components tab, you should see Command Line Tools:

XcodeCommandLineTools.png

Compiling

Navigate to the BRL-CAD source directory you downloaded and create a new folder titled "brlcad-build." This is where we will store the configured build:

BrlcadFolder.png

Open Terminal (in /User/Applications/Utilities) and cd to the location of the BRL-CAD source folder (Note: you can type cd, press the spacebar, and then drag the brlcad folder to copy its search path):

 cd brlcad

Now, we will need to configure the source files and install them (Note: this may take some time):

 cd brlcad-build
 cmake ..
 sudo make install

We can now build a BRL-CAD xcode project that we can use to compile BRL-CAD. Be sure to cd to the brlcad-x.y.z and run the following command:

File:XcodeTerminalCommand.png

The Xcode project file that should result.