Cmake: Include 3rdparty cmake dependencies in CMAKE_MODULE_PATH

QtWayland looks for WaylandScanner. If QtBase is installed our CMake
find files will be installed and everything will work correctly.

If QtBase is not installed yet or out of date, we need to add our source
cmake files to the search path. We currently add one of the 3rd party
directories, but not the subdirectories.

Change-Id: I53ce26b5b21b7e5e74752c730bca90295147f851
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
David Edmundson
2020-08-12 12:39:08 +01:00
parent 572aadf1fb
commit c416b79407

View File

@@ -41,6 +41,8 @@ endfunction()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if (NOT QT_BUILD_STANDALONE_TESTS)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/qtbase/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/qtbase/cmake/3rdparty/extra-cmake-modules/find-modules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/qtbase/cmake/3rdparty/kwin")
endif()
include(ECMOptionalAddSubdirectory)