2014-04-06 21:42:48 +05:30
|
|
|
if(__QMAKEQUERY_CMAKE__)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
set(__QMAKEQUERY_CMAKE__ TRUE)
|
|
|
|
|
2022-05-03 01:04:09 +05:30
|
|
|
if(QT_VERSION_MAJOR EQUAL 5)
|
|
|
|
get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION)
|
|
|
|
elseif(QT_VERSION_MAJOR EQUAL 6)
|
|
|
|
get_target_property(QMAKE_EXECUTABLE Qt6::qmake LOCATION)
|
|
|
|
endif()
|
2014-04-06 21:42:48 +05:30
|
|
|
|
|
|
|
function(QUERY_QMAKE VAR RESULT)
|
|
|
|
exec_program(${QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output )
|
|
|
|
if(NOT return_code)
|
|
|
|
file(TO_CMAKE_PATH "${output}" output)
|
|
|
|
set(${RESULT} ${output} PARENT_SCOPE)
|
|
|
|
endif(NOT return_code)
|
|
|
|
endfunction(QUERY_QMAKE)
|