In the CI system, an environment variable is used to convey
the CMAKE_PREFIX_PATH, but that can not be relied upon.
Change-Id: Ie4fbacaac6ae18f95a3b4d1e796a4b4c91a418c4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-find_package(Qt5Gui REQUIRED)
-find_package(Qt5Test REQUIRED)
+if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/FindPackageHints.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHints.cmake")
+endif()
+
+find_package(Qt5Gui REQUIRED HINTS ${Qt5Tests_PREFIX_PATH})
+find_package(Qt5Test REQUIRED HINTS ${Qt5Tests_PREFIX_PATH})
include_directories(
${Qt5Gui_INCLUDE_DIRS}
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-find_package(Qt5Widgets REQUIRED)
-find_package(Qt5Test REQUIRED)
+if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/FindPackageHints.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHints.cmake")
+endif()
+
+find_package(Qt5Widgets REQUIRED HINTS ${Qt5Tests_PREFIX_PATH})
+find_package(Qt5Test REQUIRED HINTS ${Qt5Tests_PREFIX_PATH})
include_directories(
${Qt5Widgets_INCLUDE_DIRS}