APIG_ROOT
will denote the root of this api (usually /usr/local/api_graphics
). It is organised as follows :APIG_ROOT/data
: place for common data used by the apiAPIG_ROOT/doc
: contains this documentation and the doxygen confiuration file to generate it.APIG_ROOT/examples
: contains projects examples using this api.APIG_ROOT/lib
: contains external libs used by classes of the apiAPIG_ROOT/qmake
: contains qmake
configuration files (
.prf) for this apiAPIG_ROOT/src
: contains the source files of the api.APIG_ROOT
.A typical qmake project configuration file (.pro) looks like this :
TARGET = Prog # name of the produced executable TEMPLATE = app # make an application, not a library CONFIG *= warn_on debug # to get warnings and debug info CONFIG *= apig # necessary to use ApiG classes HEADERS = sources/*.h # all the C++ headers of the project SOURCES = sources/*.cpp # all the C++ sources of the project OBJECTS_DIR = .obj # the directory where will be placed object (.o) files.
Once this project file is created just run the following commands in a shell, in the directory containing the .pro file :
> qmake > make
The program should be compiled.
qmake
works with configuration files indentified by a
.prf extension.
For each token (e.g. apig
) put in the CONFIG
variable, qmake
will search for a corresponding .prf file (e.g.
apig.prf
) in standard Qt locations and also in directories listed in the QMAKEFEATURES
environment variable (or the corresponding Qt "property variable" whose value can be queried using qmake
-query
or set using qmake
-set
QMAKEFEATURES
...).
The directory APIG_ROOT/qmake
contains useful .prf files for ApiG projects configuration. So simply adding a
CONFIG
+=
apig
line to your project file makes automatic and transparent the necessary includes and dependencies resolution for ApiG classes.
ApiGraphics
subdirectory. Only the parent of this directory is put in the INCLUDEPATH
, so that it makes necessary to explicitly specify the full names to include ApiG headers, e.g.: #include <ApiGraphics/ProgGLSL.h>
apig
namespace.