\hypertarget{a00194_dependencies}{}\section{Dependencies}\label{a00194_dependencies}
Open\+Flipper is developed on top of the Qt framework. This framework provides easy cross platform development. Therefore an installed version of Q\+T with at least version 4.\+8.\+6 is required. We use the cmake Make\+File generator to build Open\+Flipper.\hypertarget{a00194_reqlibs}{}\section{Required libraries}\label{a00194_reqlibs}

\begin{DoxyItemize}
\item 5.\+5 $>$= Qt $>$= 4.\+8.\+6 ( \href{http://www.qt.io/download/}{\tt http\+://www.\+qt.\+io/download/} ) Use the Open\+G\+L version for Qt $>$= 5.\+0 
\item G\+L\+U\+T ( \href{http://www.opengl.org/resources/libraries/glut/}{\tt http\+://www.\+opengl.\+org/resources/libraries/glut/} ) 
\item G\+L\+E\+W ($>$=1.\+6) ( \href{http://glew.sourceforge.net}{\tt http\+://glew.\+sourceforge.\+net} ) 
\end{DoxyItemize}\hypertarget{a00194_optlibs}{}\section{Optional libraries ( Without these libraries some functionality might not be available)}\label{a00194_optlibs}

\begin{DoxyItemize}
\item Q\+W\+T ($>$=6.\+0) ( optional, used for histogram plottings, \href{http://qwt.sourceforge.net/}{\tt http\+://qwt.\+sourceforge.\+net/}) 
\end{DoxyItemize}\hypertarget{a00194_bs}{}\section{Build System}\label{a00194_bs}
The build system uses cmake to generate all makefiles.\hypertarget{a00194_build_cmake}{}\section{Building Open\+Flipper using Cmake}\label{a00194_build_cmake}
For the following section C\+Make $>$= 2.\+8.\+4 has to be installed. In the toplevel directory of Open\+Flipper is a C\+Make\+Lists.\+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 Open\+Flipper for your specific operating system.\hypertarget{a00194_cmake_blinux}{}\subsection{Building Open\+Flipper under Linux}\label{a00194_cmake_blinux}

\begin{DoxyItemize}
\item First install the required libraries via your linux distributions package management e.\+g. apt or rpm (for the list of packages see above)~\newline
 
\item Extract the source code or get it via svn\+:~\newline
 {\ttfamily {\bfseries  svn co \href{http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free}{\tt http\+://www.\+openflipper.\+org/svnrepo/\+Open\+Flipper/branches/\+Free} Open\+Flipper}} 
\item Create a build directory (e.\+g. {\bfseries build}) in the toplevel directory\+: {\ttfamily {\bfseries mkdir build}} 
\item Change to the newly created directory {\ttfamily {\bfseries cd build}} and type {\ttfamily {\bfseries cmake ..}} 
\item Now call {\bfseries make} to build Open\+Flipper  
\end{DoxyItemize}

To switch between debug and release build, use ~\newline
 {\bfseries cmake -\/\+D\+C\+M\+A\+K\+E\+\_\+\+B\+U\+I\+L\+D\+\_\+\+T\+Y\+P\+E=Release ..}~\newline
 ~\newline
 To change the install path use~\newline
 {\bfseries -\/\+D\+C\+M\+A\+K\+E\+\_\+\+I\+N\+S\+T\+A\+L\+L\+\_\+\+P\+R\+E\+F\+I\+X=\mbox{[}path\mbox{]}}~\newline


The created application (binaries, libs and shared files) are located in the {\bfseries Build} directory.\hypertarget{a00194_cmake_bwin}{}\subsection{Building Open\+Flipper under Windows}\label{a00194_cmake_bwin}

\begin{DoxyItemize}
\item Get Visual Studio 2008/2010  
\item Get and Install Qt ( $>$= 4.\+8.\+6 , Visual Studio Version matching your installation )  
\item Set the Q\+T\+D\+I\+R Variable to your Qt Installation directory\+:~\newline
 
\item For Qt5, you need to add the value \char`\"{}\%\+Q\+T\+D\+I\+R\%/bin\char`\"{} to the \char`\"{}\+Path\char`\"{} variable. Keep in mind\+: The \char`\"{}\+Q\+T\+D\+I\+R\char`\"{} variable is the path which includes the \char`\"{}bin\char`\"{}, \char`\"{}include\char`\"{}, \char`\"{}lib\char`\"{}, ... directories.

~\newline
 {\bfseries Windows Vista/7\+:} ~\newline
 Open the Control Panel~\newline
 Select System and Security -\/$>$ System -\/$>$ Advanced System settings~\newline
 Click on \char`\"{}\+Advanced\char`\"{} tab~\newline
 At the bottom click on \char`\"{}\+Environment Variables\char`\"{}~\newline
 In the bottom window,check if there is already a Q\+T\+D\+I\+R entry and modify it or use \char`\"{}\+Add\char`\"{} to create it~\newline
 Set the path to your Q\+T installation directory~\newline
 ~\newline
 {\bfseries Windows X\+P\+:} ~\newline
 Open the Control Panel~\newline
 Select System~\newline
 Click on \char`\"{}\+Advanced\char`\"{} tab~\newline
 At the bottom click on \char`\"{}\+Environment Variables\char`\"{}~\newline
 In the bottom window,check if there is already a Q\+T\+D\+I\+R entry and modify it or use \char`\"{}\+Add\char`\"{} to create it~\newline
 Set the path to your Q\+T installation directory~\newline
 ~\newline
  
\item Extract Open\+Flipper source code. ( If you want to use svn you can get a free svn client from \href{http://tortoisesvn.net/downloads}{\tt http\+://tortoisesvn.\+net/downloads} )  
\item Download the glew library and install it (The best way is to install it to c\+:\textbackslash{}libs\textbackslash{}glew directory ).)~\newline
 The c\+:\textbackslash{}libs\textbackslash{}glew\textbackslash{}lib subdirectory should contain the dll and the $\ast$.lib files)~\newline
 The headers should be located in the c\+:\textbackslash{}libs\textbackslash{}glew\textbackslash{}include\textbackslash{}gl subdirectory 
\item Rearrange the files in the glut-\/3.\+7 directory such that)~\newline
 all $\ast$.lib and $\ast$.dll files are in a c\+:\textbackslash{}libs\textbackslash{}glut-\/3.\+7\textbackslash{}lib subdirectory)~\newline
 and the glut.\+h file is moved to the subdirectory c\+:\textbackslash{}libs\textbackslash{}glut-\/3.\+7\textbackslash{}include\textbackslash{}gl\textbackslash{}glut.\+h 
\item Get cmake for windows from \href{http://www.cmake.org/cmake/resources/software.html}{\tt http\+://www.\+cmake.\+org/cmake/resources/software.\+html}  
\item Start the cmake gui and select the Open\+Flipper toplevel directory as source directory   
\item Choose a build directory (e.\+g. a subdirectory called {\ttfamily build-\/release} in Open\+Flipper's root dir)  
\item Click on configure   
\item Choose a generator for Visual Studio (according to your Visual Studio version)....  
\item 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.  
\item Rerun configure until everything is configured correctly and no more red rows or errors are shown. 
\item Click generate to create the visual studio project files  
\item You can now find a Visual Studio solution file (Open\+Flipper.\+sln) in the {\bfseries build directory} directory you chose in cmake. 
\item Now you can build Open\+Flipper from within Visual Studio using the newly created project file by starting Build Solution.  
\end{DoxyItemize}

\begin{DoxyNote}{Note}
If you want to build Open\+Flipper as release on windows, you don't have to set the C\+M\+A\+K\+E\+\_\+\+B\+U\+I\+L\+D\+\_\+\+T\+Y\+P\+E variable to \char`\"{}\+Release\char`\"{} before configuring generating the Visual Studio solution file. Instead, choose the build type \char`\"{}\+Release\char`\"{} in Visual Studio and build the solution.
\end{DoxyNote}
Don't forget setting up the \char`\"{}\+Open\+Flipper\char`\"{} target as startup project as shown in the image below to run the debugger with Open\+Flipper right out of Visual Studio. \hypertarget{a00194_cmake_bmacos}{}\subsection{Building Open\+Flipper under Mac\+O\+S X}\label{a00194_cmake_bmacos}

\begin{DoxyItemize}
\item First install the required libraries~\newline
 To get all required libraries you should use the macports project\+: \href{http://www.macports.org/}{\tt http\+://www.\+macports.\+org/} ~\newline
 ~\newline
 Install at least the following ports\+: ~\newline
 qt4-\/mac +debug~\newline
 glew~\newline
 glut~\newline
 cmake~\newline
 br /$>$ As additional ports we recommend the following~\newline
 fftw-\/3~\newline
 qwt-\/60 +debug +qt4~\newline
 subversion~\newline
 doxygen~\newline
 
\item Extract the source code or get it via svn\+:~\newline
 {\ttfamily {\bfseries  svn co \href{http://www-i8.informatik.rwth-aachen.de/svnrepo/OpenFlipper/branches/Free}{\tt http\+://www-\/i8.\+informatik.\+rwth-\/aachen.\+de/svnrepo/\+Open\+Flipper/branches/\+Free} Open\+Flipper}} 
\item Create a build directory (e.\+g. {\bfseries build}) in the toplevel directory\+: {\ttfamily {\bfseries mkdir build}} 
\item Change to the newly created directory ( {\ttfamily {\bfseries cd build}} ) and type {\ttfamily {\bfseries cmake ..}} or if you want to build in release mode type {\ttfamily {\bfseries  cmake -\/\+D\+C\+M\+A\+K\+E\+\_\+\+B\+U\+I\+L\+D\+\_\+\+T\+Y\+P\+E=Release ..}} ~\newline
 You can also enable bundle creation by adding {\ttfamily {\bfseries -\/\+D\+O\+P\+E\+N\+F\+L\+I\+P\+P\+E\+R\+\_\+\+C\+A\+L\+L\+\_\+\+F\+I\+X\+\_\+\+B\+U\+N\+D\+L\+E=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.)  
\item Now call {\bfseries make} to build Open\+Flipper  
\end{DoxyItemize}

The created application bundle can be found in the {\bfseries Build} directory. If you build with {\ttfamily {\bfseries -\/\+D\+O\+P\+E\+N\+F\+L\+I\+P\+P\+E\+R\+\_\+\+C\+A\+L\+L\+\_\+\+F\+I\+X\+\_\+\+B\+U\+N\+D\+L\+E=true}}, the bundle will contain all required libraries.

You can also create a drag and drop installer for mac by calling {\ttfamily {\bfseries make Open\+Flipper\+\_\+package}}. This will also call fixbundle on your Bundle. {\bfseries 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.}\hypertarget{a00194_cmake_plugin}{}\section{Building Open\+Flipper Plugins with C\+Make}\label{a00194_cmake_plugin}
Building plugins with C\+Make is very simple. The Open\+Flipper C\+Make build system expects a C\+Make\+Lists.\+txt file in each of the plugin's directories. So when developing a plugin, just make sure there is a C\+Make\+Lists.\+txt in your plugin's directory. In this file include the global file plugin.\+cmake which specifies the openflipper\+\_\+plugin() function\+:

{\ttfamily include(plugin)}

You then have to add the following line which configures the build parameters of your plugin\+:

{\ttfamily openflipper\+\_\+plugin()}

Note\+: There are several parameters that one can pass to this function. Usage\+:


\begin{DoxyCodeInclude}
openflipper\_plugin ( [DIRS dir1 dir2 ...]
                     [DEPS dep1 dep2 ...]
                     [OPTDEPS dep1 dep2 ...]
                     [LDFLAGSADD flag1 flag2 ...]
                     [CFLAGSADD flag1 flag2 ...]
                     [LIBRARIES lib1 lib2 ...]
                     [LIBDIRS dir1 dir2 ...]
                     [INCDIRS dir1 dir2 ...]
                     [ADDSRC file1 file2 ...]
                     [INSTALLDATA dir1 dir2 ...]
                     [TRANSLATION\_LANGUAGES lang1 lang2 ...]
                     [TRANSLATION\_ADDFILES file1 file2 ...]
                     [LICENSEMANAGER])

DIRS        = additional directories with source files
DEPS        = required dependencies \textcolor{keywordflow}{for} find\_package macro
OPTDEPS     = optional dependencies \textcolor{keywordflow}{for} find\_package macro, \textcolor{keywordflow}{if} found, define ENABLE\_<Depname> will be set 
      automatically
LDFLAGSADD  = flags added to the link command
CFLAGSADD   = flags added to the compile command
LIBRARIES   = libraries added to link command
LIBDIRS     = additional link directories
INCDIRS     = additional include directories
ADDSRC      = additional source files
INSTALLDATA = directories that will be installed into the openflipper data directory

TRANSLATION\_LANGUAGES = language codes \textcolor{keywordflow}{for} translation
TRANSLATION\_ADDFILES  = additional files that should be included into the translation files

LICENSEMANAGER = Compile plugin with license management

Plugins can implement a acg\_list\_filter (\textcolor{stringliteral}{"listname"}) macro to filter out
unneeded headers, sources and ui files from the autogenerated 
build sources lists (see common.\hyperlink{a03356}{cmake} drop\_templates macro)

Translations
Create a subdirectory called translations in your Plugin directory
The *.ts files there will be used for the translations

Special DEPS:
CUDA: 
If your plugin requires cuda, add "CUDA" to the list of dependencies
and create a subdir called Cuda in your plugin directory
The files in this directory will be compiled by nvcc and linked
into the plugin


\end{DoxyCodeInclude}


For a detailed description of the parameters see the C\+Make documentation. For an example of how to build a simple plugin see \hyperlink{ex1}{A simple plugin}. 