[Interest] How to use Qt6::qmake ?

Nicholas Yue yue.nicholas at gmail.com
Mon Jan 18 22:30:48 CET 2021


I would like to run it at configure time because I need to extract the
relevant paths from the query command which I need as part of fixup_bundle
and language processing (Linguist)

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}


#  )

It seems that commands like `ls` works but not qmake

Cheers

On Mon, 18 Jan 2021 at 01:35, Kai Köhne <Kai.Koehne at qt.io> wrote:

> Hi,
>
>
>
> execute_process is done at CMake configure time. You should be able to use
> Qt6::qmake target if you use add_custom_command.
>
>
>
> Regards
>
>
>
> Kai
>
>
>
> *From:* Interest <interest-bounces at qt-project.org> *On Behalf Of *Nicholas
> Yue
> *Sent:* Monday, January 18, 2021 6:02 AM
> *To:* interest at qt-project.org
> *Subject:* [Interest] How to use Qt6::qmake ?
>
>
>
> Hi,
>
>
>
>   I would like to use qmake within a CMake build with the following
>
>
>
> find_package(Qt6 COMPONENTS CoreTools UiTools LinguistTools Widgets OpenGL
> OpenGLWidgets REQUIRED CONFIG)
>
>
>
> execute_process(Qt6::qmake
>   OUTPUT_VARIABLE
>   qmake_stdout
>   )
>
>
>
>   How ever, the following reports that Qt6::qmake is not found
>
>
>
>   execute_process given unknown argument "Qt6::qmake".
>
>
>
> Cheers
>
>
>


-- 
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210118/7a7f9ee1/attachment.html>


More information about the Interest mailing list