diff --git a/CMakeLists.txt b/CMakeLists.txt index d75a27b..00b8ab8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,9 +11,14 @@ project(QtMqtt LANGUAGES CXX C ) -find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Network) -find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Quick # For tests - Gui Widgets WebSockets) # For examples +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals) + +# This should be called as early as possible, just after find_package(BuildInternals) where it is +# defined. qt_internal_project_setup() +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Core Network) +find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Quick # For tests + Gui Widgets WebSockets) # For examples + qt_build_repo()