SuperBuild

From FarsightWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Make sure the paths to SVN, GIT and the QT-qmake executable are in your system path. To test open up a command window and type ''echo %PATH%''. Or switch to your favorite Linux ...")
 
(Prerequisites)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Make sure the paths to SVN, GIT and the QT-qmake executable are in your system path. To test open up a command window and type ''echo %PATH%''.
+
== Prerequisites ==
 +
*Install subversion from http://subversion.apache.org/packages.html
 +
*Checkout Farsight source code from https://farsight-svn.ee.uh.edu/repos/farsight/trunk
 +
*Install CMake 2.8.5 or newer: http://cmake.org/cmake/resources/software.html
  
Or switch to your favorite Linux distro with a package manager and install the packages for git, subversion and qt-development tools.
+
== Configure ==
  
On windows, open up the cmake-gui and in the source navigate to the folder(if you have been following the above instrucations) C:\Lab\farsight\trunk\SuperBuild. Then pick a folder where you want the binaries to be built. Click configure, then generate and then go to the binary folder, open the Farsight.sln file and push F7 on your keyboard.
+
=== Use cmake-gui or ccmake to configure the SuperBuild ===
  
In linux, let's say you have created a folder /home/user/farsight
+
*For Source Directory, specify <farsight-trunk>/SuperBuild
  
In the terminal execute ''svn co https://farsight-svn.ee.uh.edu/repos/farsight/trunk /home/user/farsight/farsight-src''
+
*Your Build Directory can be wherever you wish. Note that in addition to the FARSIGHT binaries, your build directory will also contain all the source code & binaries for VTK, VXL, and (except on Windows) ITK.
  
Then, ''cmake /home/user/farsight/farsight-src/SuperBuild /home/user/farsight/farsight-bin''
+
*If you have Qt installed on your system, enable the USE_SYSTEM_QT option and set QT_QMAKE_EXECUTABLE to the location of qmake.  This will prevent the SuperBuild from downloading & building Qt, saving you considerable time.
  
Then, navigate to the binary folder by ''cd /home/user/farsight/farsight-bin''
+
*Visual Studio requires ITK to have a relatively short path to the source code.  On Windows, you can set ITK_BASE_DIR to where you'd like to download & build ITK.  The default option of C:/ITK is known to be short enough.
  
Take a break after you execute this in the binary folder ''make -j16''
+
*Once you're happy with the configuration settings, tell CMake to '''generate''' the build files.
 +
 
 +
== Build ==
 +
 
 +
Use your compiler or IDE of choice to build the FARSIGHT project.
 +
 
 +
=== Visual Studio ===
 +
Navigate to the binary folder, open the FarsightSuperBuild.sln file and push F7 on your keyboard.
 +
 
 +
=== Makefiles ===
 +
 
 +
Navigate to the binary folder
 +
  cd /home/user/farsight/farsight-bin
 +
 
 +
Take a break after you execute this in the binary folder
 +
  make -j9 (or 16, 2*number_of_cores is usually a safe bet)
 +
 
 +
== Let us know if it doesn't work for you! ==

Latest revision as of 15:14, 24 May 2013

Contents

Prerequisites

Configure

Use cmake-gui or ccmake to configure the SuperBuild

  • For Source Directory, specify <farsight-trunk>/SuperBuild
  • Your Build Directory can be wherever you wish. Note that in addition to the FARSIGHT binaries, your build directory will also contain all the source code & binaries for VTK, VXL, and (except on Windows) ITK.
  • If you have Qt installed on your system, enable the USE_SYSTEM_QT option and set QT_QMAKE_EXECUTABLE to the location of qmake. This will prevent the SuperBuild from downloading & building Qt, saving you considerable time.
  • Visual Studio requires ITK to have a relatively short path to the source code. On Windows, you can set ITK_BASE_DIR to where you'd like to download & build ITK. The default option of C:/ITK is known to be short enough.
  • Once you're happy with the configuration settings, tell CMake to generate the build files.

Build

Use your compiler or IDE of choice to build the FARSIGHT project.

Visual Studio

Navigate to the binary folder, open the FarsightSuperBuild.sln file and push F7 on your keyboard.

Makefiles

Navigate to the binary folder

 cd /home/user/farsight/farsight-bin

Take a break after you execute this in the binary folder

 make -j9 (or 16, 2*number_of_cores is usually a safe bet)

Let us know if it doesn't work for you!

Personal tools