Skip to content

Build and Install

CodePhase edited this page Nov 11, 2015 · 7 revisions

There are several ways to compile AwesomeBump, via cmake, QtCreator, or qmake. In all cases, it is required to first install dependency development packages. These include:

Fedora

  • qt5-qtbase
  • qt5-qtbase-devel
  • libQGLViewer-qt5-devel
  • mesa-libGL-devel

cmake

cmake is used on the command line. Several options are available:

  • -DCMAKE_BUILD_TYPE=Release Will do a Release build. make install is required afterwards for the program to function. The default CMAKE_BUILD_TYPE is Default.
  • -Drelease_gl330=1 Enables OpenGL 3.3.0 support.
  • -DRESOURCE_BASE=<path> Optional path (absolute or relative) to place resource files when installing via make install. Defaults to /usr/local/lib64/awesomebump when doing a Release build. Defaults to the binary's build directory for all other build types.
  • -DCMAKE_INSTALL_PREFIX=<path> Optional path prefix for installing the binary and resource files when doing make install.

For convenience when doing a non-Release build, make install will copy all of the resource files from Bin/ to the binary's build directory for you. This isn't required though, and you can optionally copy the binary to the resource directory (Bin/) as before this commit or copy the resource files (Bin/*) to the build directory. Here's the preferred way to use this:

cd <AB-source-dir>
mkdir build
cd build
cmake [options] ..
make
make install

Don't forget the .. after cmake [options]!

QtCreator

TODO

qmake

Build script: The source tree includes a script that will build AwesomeBump using qmake called unixBuildScript.sh. To use it, edit the script and update the Qt path variable and/or the qmake binary name (qmake-qt5 in Fedora for example) if necessary. Then execute the script: sh unixBuildScript.sh. Then start the program:

cd Bin/
./AwesomeBump

Manual: Manually using qmake allows for using the OpenGL 3.3.0 flag like this: qmake "CONFIG+=release_gl330". To manually use qmake:

cd Sources
qmake [options]
make
cp AwesomeBump ../Bin

Please note that some platforms use different binary names for qmake. For example Fedora's binary in qt5 is qmake-qt5.

Clone this wiki locally