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>
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
}