-if(Qt5Core_FOUND)
- message("-- Using Qt5")
- find_package(Qt5Widgets REQUIRED)
- find_package(Qt5Gui REQUIRED)
- find_package(Qt5Svg REQUIRED)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
- set(QT_INCLUDE_DIRS ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
- set(QT_LIBRARIES Qt5::Gui Qt5::Widgets Qt5::Svg)
- add_definitions(${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS})
-else()
- find_program(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 qmake-mac)
- find_package(Qt4 REQUIRED QtCore QtGui QtSvg)
-endif()