Move `qt_internal_project_setup` as early as possible
The earliest we can move this is right after `BuildInternals`. This allows us to add function calls before navigating the `find_package` tree of the dependents. Task-number: QTBUG-135233 Change-Id: I77d42d2b621861ad16db4f4a8016c1668964427a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
dadcc1400e
commit
4a7745d522
|
@ -11,10 +11,15 @@ project(QtImageFormats
|
|||
LANGUAGES CXX C
|
||||
)
|
||||
|
||||
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
|
||||
find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui)
|
||||
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)
|
||||
find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui)
|
||||
|
||||
if(NOT TARGET Qt::Gui)
|
||||
message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\" is not met.")
|
||||
return()
|
||||
|
|
Loading…
Reference in New Issue