Using CMake

CMake philosophy is the following:

The 'test' sub-directory of the Imagine++ installation directory contains useful examples of such files. As an example, let's compile the Graphics tests.

The CMakeLists.txt (<Imagine_DIR>/test/Graphics/CMakeLists.txt) file of the Graphics test is simple, and your own should follow this model:

cmake_minimum_required(VERSION 2.6)
find_package(Imagine REQUIRED)
add_executable(ImagineGraphicsExample example.cpp)
ImagineUseModules(ImagineGraphicsExample Graphics)
add_executable(ImagineGraphicsTest test.cpp)
ImagineUseModules(ImagineGraphicsTest Graphics)

Two executables are defined, ImagineGraphicsExample and ImagineGraphicsTest, built respectively from example.cpp and tesp.cpp, each of them using the Graphics module. The first few lines are mandatory for any Imagine++ project: they check the Imagine_DIR environment variable, which is mandatory to use Imagine++ (see Introduction).

Finally, if an executable depends on more than one C++ source, just add them as arguments to add_executable separated by whitespace. See other tests and refer to CMake own manual for further information.

QtCreator (all platforms)

QtCreator works on all platforms

Visual Studio (Windows)

To use under Windows:

From a terminal (all platforms)