From bcd3c09fc6f4264108e0e658122515b50db29c77 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 28 Dec 2017 01:21:13 +0100 Subject: Add package include dirs config Fix getRealPath returning corrupt path. This allows you to specifying a list of include dirs under [package], like: [package] name = "blabla" include_dirs = ["include"] There are many libraries that include paths to header files like this, so when including a header file, you dont have to specify relative path to header files (which can be long), and you can use same path no matter where you are including header from. Currently include_dirs is not propagated to dependant packages and im not sure if they should be, from the looks of it the reason you want include_dirs is internal package setup. --- include/Conf.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/Conf.hpp b/include/Conf.hpp index 8da352e..b893d3a 100644 --- a/include/Conf.hpp +++ b/include/Conf.hpp @@ -116,6 +116,11 @@ namespace sibs { return projectPath; } + + virtual const std::vector& getIncludeDirs() const + { + return includeDirs; + } protected: virtual void processObject(StringView name) override; virtual void processField(StringView name, const ConfigValue &value) override; @@ -127,6 +132,7 @@ namespace sibs std::string testPath; PackageType packageType; std::vector dependencies; + std::vector includeDirs; bool finishedProcessing; }; -- cgit v1.2.3