diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-03-28 07:15:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:58 +0200 |
commit | c6e8fe8125f8900f3019716aa1cfbf18ff8264bd (patch) | |
tree | 8eefe81c1cffe59cf6aeea75741f6f92c3edcb40 /src/CmakeModule.cpp | |
parent | 615093ac7f3f647855b60b3a65352140bc44b378 (diff) |
Add support for absolute paths in include_dirs config
Diffstat (limited to 'src/CmakeModule.cpp')
-rw-r--r-- | src/CmakeModule.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp index 8c97b6e..a690948 100644 --- a/src/CmakeModule.cpp +++ b/src/CmakeModule.cpp @@ -190,10 +190,17 @@ namespace sibs #endif for(const auto &includeDir : config.getIncludeDirs()) { - FileString includeDirRelative = FileString("../../../"); - includeDirRelative += toFileString(includeDir); cflags += TINYDIR_STRING(" "); - cflags += getIncludeOptionFlag(config.getCompiler(), includeDirRelative); + if(isPathAbsolute(includeDir)) + { + cflags += getIncludeOptionFlag(config.getCompiler(), toFileString(includeDir)); + } + else + { + FileString includeDirRelative = FileString("../../../"); + includeDirRelative += toFileString(includeDir); + cflags += getIncludeOptionFlag(config.getCompiler(), includeDirRelative); + } } cxxflags = cflags; |