-
Notifications
You must be signed in to change notification settings - Fork 18
Creating new demos for KoRE
Nils Lichtenberg edited this page May 24, 2013
·
1 revision
If you want to get a quick look at KoRE and set up your own cross-platform code for some testing, this guide will help you if you are not familiar with CMake. The following steps are not recommended for more complex projects.
- The demos are located in
REPO_ROOT/KoRE/demos
. - In this folder, create a new folder
YOUR_DEMO
.YOUR_DEMO
will hold the sources and aCMakeLists.txt
to define project settings. - As you can see in the MainGLFW demo, .cpp and .h files can simply be stored in that folder.
- Have a look at
REPO_ROOT/KoRE/demos/MainGLFW/CMakeLists.txt
. This file defines the project settings for that demo - for each platform. Here, paths to included libraries and headers are defined. You can copy that file intoYOUR_DEMO
. - If you want to use additional libraries, modify
YOUR_DEMO/CMakeLists.txt
accordingly and copy the library files intoREPO_ROOT/ext
. Note that changes to theCMakeLists.txt
may have to be made differently for each platform. - The command to add libraries is
set(KoRE_LIBS NAME_OF_LIB)
. - To make CMake able to find your new project, open
REPO_ROOT/KoRE/demos/CMakeLists.txt
and add the lineADD_SUBDIRECTORY(YOUR_DEMO)
. - Now run CMake again from
REPO_ROOT/KoRE
and your demo is ready to work with.