Skip to content

Build and Install

CodePhase edited this page Nov 12, 2015 · 7 revisions

There are several ways to compile AwesomeBump: via cmake, QtCreator, or qmake. Please note that the executable binary's name for the cmake method is awesomebump but is AwesomeBump with the QtCreator and qmake methods. Case is important in Linux but not Windows. 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

On the command line, you can retrieve the source code using git: git clone https://github.com/kmkolasinski/AwesomeBump.git This will create a local repository in a folder called AwesomeBump.

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 Debug.
  • -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 relative path 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/) or copy the resource files (Bin/*) to the build directory.

Here's the preferred way to compile with cmake:

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

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

QtCreator

An excellent walk through using this method is available as part of AB's source download. It comes complete with screenshots. Here's a separate link for convenience: QtCreator Instructions. This walkthrough includes instructions for building with QtCreator on Windows.

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 Build/Bin/AwesomeBump ../Bin

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

Installing when using this compile method is a manual process. You will need to copy the binary at Source/Build/Bin/AwesomeBump and also Bin/* to the same directory someplace in your filesystem. That place is your choice. Then just run the binary.

Clone this wiki locally