git clone https://github.com/Synxis/SPARK
cd SPARK
mkdir build
cd build
cmake -DSPARK_BUILD_DEMOS:BOOL="1" ../projects
cmake --build . --config Release
cd SPARK/demos/bin
./Test_Simple (or just 'Test_Simple.exe' on Windows)
cmake -DSPARK_BUILD_DEMOS:BOOL="1" \
-DSPARK_BUILD_IRRLICHT_MODULE:BOOL="1" \
-DSPARK_IRRLICHT_LIB:FILEPATH="/path/to/the/irrlicht/lib/filename" \
-DSPARK_IRRLICHT_INCLUDE_DIR:PATH="/path/to/the/folder/with/the/irrlicht/headers/"
cmake --build . --config Release
By default the compiled libraries and demos will be placed in:
SPARK
├── lib/
│ └── <system-name>@<generator>/
| └── static/
| └── dynamic/
└── demos/
└── bin/
- <system-name> is the name of your OS (ex: Windows)
- <generator> is the name of the generator used (ex: Visual Studio 10)
Available cmake variables:
-
SPARK_USE_HARCODED_RUNTIME_OUTPUT_DIRS
if set toFALSE
it will make cmake use the build directory to output all the results of the compilation instead of using the hardcoded directory layout above. -
SPARK_STATIC_BUILD
controls whether SPARK is built as a static or dynamic library. -
SPARK_IRRLICHT_USE_STATIC_LIBS
controls whether SPARK will be linked with a static or dynamic Irrlicht library. -
SPARK_IRRLICHT_DEBUG
is only available when using cmake with multi configuration generators. This variable sets the path to the file of the debug Irrlicht library. If using a visual studio generator without setting theSPARK_IRRLICHT_DEBUG
variable theDebug
configuration won't be available. Here's an example:cmake -DSPARK_BUILD_DEMOS:BOOL="1" \ -DSPARK_BUILD_IRRLICHT_MODULE:BOOL="1" \ -DSPARK_IRRLICHT_LIB:FILEPATH="/path/to/the/irrlicht/release/lib/filename" \ -DSPARK_IRRLICHT_LIB_DEBUG:FILEPATH="/path/to/the/irrlicht/debug/lib/filename" \ -DSPARK_IRRLICHT_INCLUDE_DIR:PATH="/path/to/the/folder/with/the/irrlicht/headers/" cmake --build . --config Release cmake --build . --config Debug