Difference between revisions of "Documentation/4.0/Developers/Build Instructions"
Line 141: | Line 141: | ||
== Step3: Configure, Generate the solution files and Build == | == Step3: Configure, Generate the solution files and Build == | ||
+ | |||
+ | ''make'' can be run from the top-level bin directory Slicer3-SuperBuild (where ''ccmake'' was used to configure), or from Slicer3-SuperBuild/Slicer3-build. In the first case, the build script will run update on the dependency libraries (but not for Slicer source code -- for that you need to manually update the Slicer3 directory). In the second case, there will be no updates, so this approach is convenient when making local development in Slicer. | ||
==Platform Notes== | ==Platform Notes== |
Revision as of 12:52, 9 June 2010
Home < Documentation < 4.0 < Developers < Build InstructionsThe build system for Slicer4 is being developed during the second half of 2010. The goal is to provide a cross-platform build system that allows developers to quickly install and configure the multiple packages.
Where Slicer3's build system relied on a custom build script called getbuildtest, new features added to CMake, partly driven by slicer's requirements, allow porting of the scripts to rely on more on native CMake functionality with the benefit that build script is more modular and general purpose.
Contents
Prerequisites
- Download (and if required compile) Qt - Use one of the link provided below:
Linux | Mac | Windows | ||||||
---|---|---|---|---|---|---|---|---|
Tiger, Leopard | SnowLeopard | |||||||
32bits | 64bits | 32bits | 64bits | 64bits | 32bits | 64bits | ||
Qt source link | 4.6.2 | 4.7 beta | 4.6.2 | |||||
Qt binary link | 4.6.2 | 4.6.2 | 4.6.2 | 4.7 beta | 4.6.2 (vs2008) | - |
- How to build Qt ?
Configure options common to all platform:
Check our different tutorials:
- Build Qt on Windows
- Build Qt on Linux
- Build Qt on Mac
Step1 : Checkout slicer sources using subversion
For example:
cd MyProjects svn co http://svn.slicer.org/Slicer3/trunk Slicer3
Step2 : Configure slicer project using either ccmake or cmake-gui
The grids displayed below summarized the available options.
Using ccmake:
mkdir Slicer3-SuperBuild cd Slicer3-SuperBuild ccmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/myself/qt-4.6.2/qt/bin/qmake ../Slicer3/SuperBuild
Using cmake-gui
Where is the source code: C:/MyProjects/Slicer3/SuperBuild Where to build the binaries: C:/MyProjects/Slicer3-SuperBuild
Set of options and supported plateforms:
Description | Options | Platform | |||||
---|---|---|---|---|---|---|---|
Slicer3_USE_KWWIDGETS | Slicer3_USE_PYTHON | Slicer3_USE_QT | Slicer3_USE_PYTHONQT | Linux | Mac | windows | |
Kww-Python DEFAULT | ON | ON | OFF | OFF | Y | Y | Y |
Kww-NoPython | ON | OFF | OFF | OFF | Y | Y | Y |
KwwAndQt-Python | ON | ON | ON | OFF | Y | N | Y |
Qt-NoPythonQt | OFF | OFF | ON | OFF | Y | Y | Y |
Qt-PythonQt | OFF | OFF | ON | ON | Y | Y | Y |
What is the difference between Python and PythonQt build ?
Todo ...
Step3: Configure, Generate the solution files and Build
make can be run from the top-level bin directory Slicer3-SuperBuild (where ccmake was used to configure), or from Slicer3-SuperBuild/Slicer3-build. In the first case, the build script will run update on the dependency libraries (but not for Slicer source code -- for that you need to manually update the Slicer3 directory). In the second case, there will be no updates, so this approach is convenient when making local development in Slicer.
Platform Notes
- On windows and mac python gets rebuilt every time you type make.
- You currently need to manually set the DYLD_LIBRARY_PATH (mac) and related paths to run the executable Slicer3-SuperBuild/Slicer3-build/bin/SlicerQT
export DYLD_LIBRARY_PATH=<path/to>/Slicer4-SuperBuild/CTK-build/CTK-build/bin:<path/to>/Slicer4-SuperBuild/CTK-build/CMakeExternals/Install/lib