mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Check that qmake runs successfully and check Qt version
This commit is contained in:
@@ -8,6 +8,22 @@ endif()
|
||||
set(QMAKE_QT5_COMMAND ${QT_QMAKE_EXECUTABLE} CACHE STRING "Command to run to invoke Qt5's qmake. Normally this is qmake, possibly with qtchooser, but might be qmake-qt5")
|
||||
set(RENDERDOC_SWIG_PACKAGE https://github.com/baldurk/swig/archive/renderdoc-modified-7.zip CACHE STRING "The location where RenderDoc's swig fork source can be found. By default points to the URL on github but can be pointed to a local file.")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_VERSION
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE QT_VERSION
|
||||
ERROR_VARIABLE QT_VERSION_STDERR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# we need the trailing .999 since 5.5.1 would be VERSION_GREATER than 5.5 which implicitly means 5.5.0
|
||||
if (QT_VERSION VERSION_GREATER 5.5.999)
|
||||
message(STATUS "Building using Qt ${QT_VERSION}")
|
||||
else()
|
||||
message(FATAL_ERROR "${QT_QMAKE_EXECUTABLE} -query QT_VERSION returned: \"${QT_VERSION}\". Error output was: \"${QT_VERSION_STDERR}\". We require Qt >= 5.6 and for the qmake executable to run Qt5. Check your distribution for how to configure Qt5, you may need to set the QT_SELECT environment variable or customise the cmake variable QT_QMAKE_EXECUTABLE to qmake-qt5")
|
||||
endif()
|
||||
|
||||
set(QMAKE_CONFIG "debug")
|
||||
set(QMAKE_LDFLAGS "")
|
||||
set(QMAKE_CXXFLAGS "")
|
||||
|
||||
Reference in New Issue
Block a user