summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-06-29 08:18:56 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-03 01:08:18 +0200
commit7327ae8c170cb4d6bd3ecde16b12f575268661b5 (patch)
tree2e868facd8c717d71127b8513c6a97920b362b5c
parenta8ec5e912f89d976f51cf9440e73cc8434410b38 (diff)
Look for CMake config files in the same prefixes as mkspecs.
This will allow tests of modules outside of qtbase to find their CMake config files. Change-Id: I68036908d0fd2ec640530b57d0f572d211ef44f0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rw-r--r--mkspecs/features/ctest_testcase.prf6
1 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf
index f8283a59db..c0ed14de98 100644
--- a/mkspecs/features/ctest_testcase.prf
+++ b/mkspecs/features/ctest_testcase.prf
@@ -31,9 +31,13 @@ isEmpty(CMAKE_VERSION) {
BUILD_DIR = $$replace($$list($$OUT_PWD/build), /, $$QMAKE_DIR_SEP)
+ for(d, $$list($$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR))) {
+ CMAKE_PREFIX_PATH *= $$dirname($$d)
+ }
+
check.commands = \
$(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \
- cmake $$_PRO_FILE_PWD_ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=\"$$[QT_INSTALL_PREFIX]\" && \
+ cmake $$_PRO_FILE_PWD_ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=\"$$join(CMAKE_PREFIX_PATH, ;)\" && \
$(TESTRUNNER) ctest --output-on-failure
}