Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
6.0.0
-
None
-
Ubuntu 18.04
Description
Using the following as a test, I believe Qt6::qmake is not setup correct to point to an executable.
cmake_minimum_required(VERSION 3.19)
project(Qt6Tutorial)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt6 COMPONENTS CoreTools UiTools LinguistTools Widgets OpenGL OpenGLWidgets REQUIRED CONFIG)
set(some_file ${CMAKE_CURRENT_BINARY_DIR}/output.txt)
execute_process(COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qmake -query
{{ OUTPUT_FILE ${some_file}}}
{{ )}}
{{#execute_process(COMMAND ls /tmp }}
{{# OUTPUT_FILE ${some_file} }}
# )
Comparing the setup for ::qmake in the CMake configuration on Qt5, I see the following (in Qt5CoreConfigExtras.cmake)
if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED)
set(imported_location "${_qt5Core_install_prefix}/bin/qmake")
_qt5_Core_check_file_exists(${imported_location})
set_target_properties(Qt5::qmake PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
endif()
Whereas in Qt6, I can only find this (in Qt6CoreToolsAdditionalTargetInfo.cmake)
# Default configuration }}{{if(_qt_imported_location_default)
set_property(TARGET Qt6::qmake PROPERTY IMPORTED_LOCATION "${_qt_imported_location_default}")
endif()
this lead me to believe that Qt6::qmake is not setup correctly.