building.docu 9.16 KB
 1 2 3 4 5 6 /*! \page buildingOpenFlipper Building OpenFlipper \section dependencies Dependencies OpenFlipper is developed on top of the Qt framework. This framework provides easy cross platform development. Therefore an installed version of QT with  Matthias Möller committed Mar 11, 2015 7 at least version 4.8.6 is required. We use the cmake MakeFile generator to build  8 9 OpenFlipper.  Jan Möbius committed Mar 23, 2012 10 \section reqlibs Required libraries  11 
 Jan Möbius committed Apr 27, 2016 12 
• 5.5 >= Qt >= 4.8.6 ( http://www.qt.io/download/ ) Use the OpenGL version for Qt >= 5.0
•  13 
• GLUT ( http://www.opengl.org/resources/libraries/glut/ )
•  Jan committed May 13, 2016 14 
• GLEW (>=1.6) ( http://glew.sourceforge.net )
•  Jan Möbius committed Mar 23, 2012 15 16 
 Jan Möbius committed Mar 23, 2012 17 \section optlibs Optional libraries ( Without these libraries some functionality might not be available)  Jan Möbius committed Mar 23, 2012 18 19 
• QWT (>=6.0) ( optional, used for histogram plottings, http://qwt.sourceforge.net/)
•  20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
\section bs Build System The build system uses cmake to generate all makefiles. \section build_cmake Building OpenFlipper using Cmake For the following section CMake >= 2.8.4 has to be installed. In the toplevel directory of OpenFlipper is a CMakeLists.txt file that specifies the build configuration and targets. In most cases this file should be left untouched. Additional functions and environment settings are to be found in the cmake directory in the toplevel folder. See following subsections for information on how to build OpenFlipper for your specific operating system. \subsection cmake_blinux Building OpenFlipper under Linux
 Jan Möbius committed Jan 24, 2012 38 
• First install the required libraries via your linux distributions package management e.g. apt or rpm (for the list of packages see above)
 Patric Schmitz committed Dec 08, 2016 39 40 
• Extract the source code or get it via git:
git clone --recursive https://graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free.git OpenFlipper
•  41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 
• Create a build directory (e.g. build) in the toplevel directory: mkdir build
• Change to the newly created directory cd build and type cmake ..
• Now call make to build OpenFlipper
To switch between debug and release build, use
cmake -DCMAKE_BUILD_TYPE=Release ..

To change the install path use
-DCMAKE_INSTALL_PREFIX=[path]
The created application (binaries, libs and shared files) are located in the Build directory. \subsection cmake_bwin Building OpenFlipper under Windows
 Martin Schultz committed Jul 11, 2017 58 59 
• Get Visual Studio 2008/2010 or 2013 we recommend 2015
• Get and Install Qt ( >= 5.5.1 , Visual Studio Version matching your installation )
•  60 
• Set the QTDIR Variable to your Qt Installation directory:
 Matthias Möller committed Apr 24, 2015 61 62 
• For Qt5, you need to add the value "%QTDIR%/bin" to the "Path" variable. Keep in mind: The "QTDIR" variable is the path which includes the "bin", "include", "lib", ... directories.  63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 
Windows Vista/7:
Open the Control Panel
Select System and Security -> System -> Advanced System settings
At the bottom click on "Environment Variables"
In the bottom window,check if there is already a QTDIR entry and modify it or use "Add" to create it
Set the path to your QT installation directory

Windows XP:
Open the Control Panel
Select System
At the bottom click on "Environment Variables"
In the bottom window,check if there is already a QTDIR entry and modify it or use "Add" to create it
Set the path to your QT installation directory

• Extract OpenFlipper source code. ( If you want to use svn you can get a free svn client from http://tortoisesvn.net/downloads )
• Download the glew library and install it (The best way is to install it to c:\\libs\\glew directory ).)
The c:\\libs\\glew\\lib subdirectory should contain the dll and the *.lib files)
The headers should be located in the c:\\libs\\glew\\include\\gl subdirectory
• Rearrange the files in the glut-3.7 directory such that)
all *.lib and *.dll files are in a c:\\libs\\glut-3.7\\lib subdirectory)
and the glut.h file is moved to the subdirectory c:\\libs\\glut-3.7\\include\\gl\\glut.h
•  Matthias Möller committed Mar 11, 2015 88 
• Get cmake for windows from http://www.cmake.org/cmake/resources/software.html
•  89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 
• Start the cmake gui and select the OpenFlipper toplevel directory as source directory
• \image html cmake-source.png
• Choose a build directory (e.g. a subdirectory called \c build-release in OpenFlipper's root dir)
• \image html cmake-builddir.png
• Click on configure
• \image html cmake-configuregenerate.png
• Choose a generator for Visual Studio (according to your Visual Studio version)....
• \image html cmake-generator.png
• If the configuration fails because of libraries and/or headers which have not been found, an error message will be printed in the bottom window. You can adjust the paths in cmake-gui manually in the large window. Note that some build variables are only visible in Advanced Mode. You can change view modes of cmake-gui via the select box on the top.
• Rerun configure until everything is configured correctly and no more red rows or errors are shown.
• Click generate to create the visual studio project files
• You can now find a Visual Studio solution file (OpenFlipper.sln) in the build directory directory you chose in cmake.
• Now you can build OpenFlipper from within Visual Studio using the newly created project file by starting Build Solution.
 Matthias Möller committed Mar 11, 2015 107 \note If you want to build OpenFlipper as release on windows, you don't have to set the CMAKE_BUILD_TYPE variable to "Release" before configuring  Marti committed Oct 15, 2016 108  generating the Visual Studio solution file. Instead, choose the build type "Release" in Visual Studio and build the solution. Console outputs are only available in Visual Studio, when the "Debug" configuration is selected, or the -c option is passed as command line option.  Matthias Möller committed Mar 11, 2015 109   Martin Schultz committed Jul 11, 2017 110 111 \note If you want to use the intel 16 compiler with VS2013 or newer you can do so by specifying the toolset for cmake and enabling c++11 for intel 16 (e.g. set CXXFLAGS="/Qstd=c++0x" and run cmake with the command line argument -T"Intel C++ Compiler 16.0")  Matthias Möller committed Mar 11, 2015 112 113 Don't forget setting up the "OpenFlipper" target as startup project as shown in the image below to run the debugger with OpenFlipper right out of Visual Studio. \image html windows_build_set_as_startup.png  114 115 116 117 118 119 120 121  \subsection cmake_bmacos Building OpenFlipper under MacOS X
• First install the required libraries
To get all required libraries you should use the macports project: http://www.macports.org/

Install at least the following ports:
 Jan Möbius committed Apr 19, 2012 122  qt4-mac +debug
 123 124 125 126 127 128  glew
glut
cmake
br /> As additional ports we recommend the following
fftw-3
 Jan Möbius committed Apr 30, 2012 129  qwt-60 +debug +qt4
 130 131 132 133 134  subversion
doxygen
• Extract the source code or get it via svn:
svn co http://www-i8.informatik.rwth-aachen.de/svnrepo/OpenFlipper/branches/Free OpenFlipper
• Create a build directory (e.g. build) in the toplevel directory: mkdir build
•  Jan Möbius committed May 02, 2012 135 136 
• Change to the newly created directory ( cd build ) and type cmake .. or if you want to build in release mode type cmake -DCMAKE_BUILD_TYPE=Release ..
 Jan Möbius committed Mar 01, 2013 137  You can also enable bundle creation by adding -DOPENFLIPPER_CALL_FIX_BUNDLE=true to the cmake command line (If you want a bundle containing all required libraries. Otherwise, the libraries will be used at their original locations.)
•  138 139 140 
• Now call make to build OpenFlipper
 Jan Möbius committed Mar 01, 2013 141 142 143 The created application bundle can be found in the Build directory. If you build with -DOPENFLIPPER_CALL_FIX_BUNDLE=true, the bundle will contain all required libraries. You can also create a drag and drop installer for mac by calling make OpenFlipper_package. This will also call fixbundle on your Bundle. Note: When fixbundle has been called, the rpaths will be switched to local libraries. Concurrent builds, will still reference the global ones, which will cause inconsistencies and crashes! You have to call fixbundle after each build if it has been called once.  144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168  \section cmake_plugin Building OpenFlipper Plugins with CMake Building plugins with CMake is very simple. The OpenFlipper CMake build system expects a CMakeLists.txt file in each of the plugin's directories. So when developing a plugin, just make sure there is a CMakeLists.txt in your plugin's directory. In this file include the global file plugin.cmake which specifies the openflipper_plugin() function: include(plugin) You then have to add the following line which configures the build parameters of your plugin: openflipper_plugin() Note: There are several parameters that one can pass to this function. Usage: \include example/cmake_plugin_usage.txt For a detailed description of the parameters see the CMake documentation. For an example of how to build a simple plugin see \ref ex1. */