libolt wrote: ↑Mon Oct 21, 2019 9:01 pm
but I'm not sure what is the best way to incorporate this into my CMake configuration.
Since this is C++, there is no "best" way to incorporate this
(Unfortunately) There's two types of header structures:
- Out of source (i.e. directly including Ogre's repository)
- SDK structure (i.e. including that's in build/SDK after running CMake install target)
They're both very similar but slightly different. Ultmately all C++ cares is that the files under Components/Hlms/Common/include are the include paths and thus the files can be found.
In Samples/2.0/Tutorials/EmptyProject we have a series of CMake scripts that assume Ogre is setup using an out of source build.
See
Using Ogre in your App
for details on using EmptyProject.
These scripts will add the required locations:
Code: Select all
include_directories( "${OGRE_BINARIES}/include" )
include_directories( "${OGRE_SOURCE}/Components/Hlms/Common/include" )
include_directories( "${OGRE_SOURCE}/Components/Hlms/Unlit/include" )
include_directories( "${OGRE_SOURCE}/Components/Hlms/Pbs/include" )
as well as storing library names into OGRE_LIBRARIES variable.
You are not forced to use EmptyProject exactly, but you can base your code on it.
DERGO,
Colibri and
Living Room for example use it and they expect Ogre repo (or a symlink) to be located in Dependencies/Ogre; and CMake's build to be stored in Dependencies/Ogre/build/Debug (and Release).
If you're having trouble, the
build scripts will generate the repository structure these scripts based on EmptyProject wants.
Cheers