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.koe...@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-boun...@qt-project.org> *On Behalf Of *Nicholas > Yue > *Sent:* Monday, January 18, 2021 6:02 AM > *To:* interest@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
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest