Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Build Instructions

sbusch42 edited this page Apr 19, 2013 · 4 revisions

CGSee is actively developed on all major platforms (Windows, Mac, Linux).

Dependencies

The following dev-libraries and programs need to be provided for correct CMake configuration:

Windows

Qt5 -opengl desktop

Do not use the official, pre-built binary packages of Qt5 that uses ANGLE and OpenGL ES 2.0. Instead build Qt yourself by either follow these official instructions or use the following manual:

  • Install ActivePerl: http://www.activestate.com/activeperl/downloads
  • Install Python 2.7.x: http://www.python.org/download/
  • Check the options in the installers to add the Perl and Python binary folders to the PATH environment variable ...
  • ... or add them manually (good util for that is Rapid EE)
  • Download Qt5 sources from http://qt-project.org/downloads
  • Extract Qt5 sources to desired installation folder (e.g. C:/Qt/5.0.2)
  • Open a command prompt that is setup for your build environment. For Visual Studio, use the Visual Studio command prompt (e.g., "Visual Studio x64 Win64 Command Prompt (2010)" for x64).
  • In the command prompt, browse to the folder where you extracted the Qt sources.
  • Configure the sources for build with the following options (adjust QMAKEPATH!):
set CL=/MP
set QMAKEPATH=C:/Qt/5.0.2/qtbase/bin
configure -opensource -confirm-license -opengl desktop -nomake examples -nomake tests
  • When Qt is configured for building just run nmake and wait...

Checkout Source Code

  • Use git client of choice to checkout CGSee source code.

Compile with VS11

  • Adjust the _configure script (check Qt and GLEW paths), e.g.:
set GLEW_HOME=D:/3rdp/glew-1.9.0
set QT_DIR=C:/Qt/5.0.2
set PATH=%GLEW_HOME%/bin;%QT_DIR%/qtbase/bin;%PATH%;
  • If you adjusted the build scripts, you can use "git update-index --assume-unchanged _*.bat" to let git ignore your personal configuration
  • Configure and Generate your project files using CMake or CMake-GUI (e.g., via the provided script _start-cmake-gui).
  • Open the cgsee project and specify the StartUp Project.
  • Configure the Working Directory pointing to the CGSee source path.
  • Compile!

Linux

Prerequisites

  • Build essentials (gcc, g++, etc.): sudo apt -get install build - essential

  • Git: sudo apt-get install git-core

  • CMake: sudo apt-get install cmake

    • On most systems, prebuilt CMake packages should be available. However, if your version is older than CMake 2.8.9, you need to install a newer version!
    • Check your CMake version: Should be >= 2.8.9! cmake --version
    • Download current CMake source code
wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
tar -xzf cmake-2.8.10.2.tar.gz
  • Configure and build
cd cmake-2.8.10.2
./configure
make
  • Install to /usr/local/bin sudo make install

  • GLM: sudo apt-get install libglm-dev

  • GLEW: sudo apt-get install libglew-dev

  • Qt5:

    • Make file executable sudo apt-get install libglew-dev
    • Run installer sudo ./qt-linux-opensource-5.0.2-x86_64-offline.run
    • Install Qt5 to /opt/Qt5.0.2/. If you chose a dierent path, you will have to adapt the configure script later.

Checkout Source Code

The following instructions equally work on Windows, Mac and Linus.

  • Make a clone of the CgSee repository
git clone https://github.com/cgcostume/cgsee.git
cd cgsee
  • Adjust configure script (check Qt path!). Content of configure:
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH =/opt/Qt5.0.2/5.0.2/gcc_64/lib/cmake/ ..
  • If you adjusted the build script, you can use "git update-index --assume-unchanged configure" to let git ignore your personal configuration
  • Configure and build
./configure
cd build
make
  • Run application
cd ..
./build/cgsee

Using QtCreator

  • Start QtCreator.
  • If you get an error message like "could not change into directory /root": edit /usr/share/applications/qtcreator.desktop and modify Path=/root/ to Path=.
  • Select [File] > [Open File or Project] and choose cgsee/CMakeLists.txt.
  • Enter build path (e.g., /home/user/cgsee/build).
  • Execute CMake (if not executed already).
  • Change [Projects] > [Run Settings] > [Working Directory] to source root directory, not the build directory! (e.g. /home/user/cgsee).
  • Build and execute project.

Mac OS

The following instructions are used for XCode. You can also use other IDEs like QtCreator or Netbeans.

  • Install gcc 4.6 or newer. Use a package manager, e.g., homebrew (brew.sh) or macports (www.macports.org).
  • Start CMake.
  • Choose generator, e.g., XCode or Unix Makefiles.
  • Choose [Specify Native Compilers].
  • Specify path to gcc-4.6 (C) and g++-4.6 (C++).
  • Configure and Generate.
  • Open XCode project and run make.