forked from qt-creator/qt-creator
CMake build: Fix workaround for new *Private targets with CMake < 3.18
Amends a803d04c17
Change-Id: I2df067d988a79845f4a9f85485c13e5e2f8019dc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -48,6 +48,7 @@ else()
|
|||||||
if(dcIndex GREATER_EQUAL 0)
|
if(dcIndex GREATER_EQUAL 0)
|
||||||
find_package(Qt6${possible_private_libs}Private CONFIG QUIET)
|
find_package(Qt6${possible_private_libs}Private CONFIG QUIET)
|
||||||
if(TARGET Qt6::${possible_private_libs}Private)
|
if(TARGET Qt6::${possible_private_libs}Private)
|
||||||
|
set_property(TARGET Qt6::${possible_private_libs}Private PROPERTY IMPORTED_GLOBAL TRUE)
|
||||||
add_library(Qt5::${possible_private_libs} ALIAS Qt6::${possible_private_libs}Private)
|
add_library(Qt5::${possible_private_libs} ALIAS Qt6::${possible_private_libs}Private)
|
||||||
list(REMOVE_AT Qt5_FIND_COMPONENTS ${dcIndex})
|
list(REMOVE_AT Qt5_FIND_COMPONENTS ${dcIndex})
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user