-
-
Notifications
You must be signed in to change notification settings - Fork 235
Specifying include directories
Doug Binks edited this page Aug 4, 2015
·
3 revisions
RCC++ is designed to work irrespective of the build system you use, so include directories need to be specified in code using RuntimeObjectSystem::AddIncludeDir("path/to/includes/");
A common way to include files in the source tree is to use something like:
FileSystemUtils::Path basePath = m_pRuntimeObjectSystem->FindFile( __FILE__ );
FileSystemUtils::Path includeDir = basePath.ParentPath() / "Include";
m_pRuntimeObjectSystem->AddIncludeDir(includeDir.c_str());
This will work for a directory above the source file which you use this code in, FileSystemUtils::ParentPath() can be used to iterate down the directory structure for other tree structures.
Include directories can be set Using ProjectsIds and Projects. For example:
enum ePROJECTIDS
{
PROJECTID_DEFAULT = 0,
PROJECTID_MODULE_AI,
PROJECTID_MODULE_GAME,
PROJECTID_MODULE_RENDERING,
PROJECTID_MODULE_AUDIO,
PROJECTID_MODULE_UI,
};
m_pRuntimeObjectSystem->AddIncludeDir(includeDir.c_str(), PROJECTID_AIMODULE );