summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-02-16 18:47:40 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-21 15:12:53 (GMT)
commit80a007534f6287cd2e88c1b8fd72b68fc688da4e (patch)
tree36774db0a2f6c53c0737b93c0e3c92127ad87499 /Source/cmQtAutoGenerators.cxx
parentf379fdbb9ee17b62ac8b4a8d4b9fab562ba37253 (diff)
downloadCMake-80a007534f6287cd2e88c1b8fd72b68fc688da4e.zip
CMake-80a007534f6287cd2e88c1b8fd72b68fc688da4e.tar.gz
CMake-80a007534f6287cd2e88c1b8fd72b68fc688da4e.tar.bz2
Autogen: Add FindInIncludeDirectories method
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index e3d20cf..62fbe18 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1627,6 +1627,25 @@ std::string cmQtAutoGenerators::FindMatchingHeader(
}
/**
+ * @brief Tries to find a file in the include directories
+ * @return True on success
+ */
+bool cmQtAutoGenerators::FindInIncludeDirectories(
+ std::string& file_n, const std::string& searchString) const
+{
+ for (std::vector<std::string>::const_iterator iit =
+ this->MocIncludePaths.begin();
+ iit != this->MocIncludePaths.end(); ++iit) {
+ const std::string fullPath = ((*iit) + '/' + searchString);
+ if (cmsys::SystemTools::FileExists(fullPath.c_str())) {
+ file_n = fullPath;
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
* @brief Generates the parent directory of the given file on demand
* @return True on success
*/