--- Source/QtDialog/CMakeLists.txt.orig
+++ Source/QtDialog/CMakeLists.txt
CMake_OPTIONAL_COMPONENT(cmake-gui)
-find_package(Qt5Widgets QUIET)
- include_directories(${Qt5Widgets_INCLUDE_DIRS})
- add_definitions(${Qt5Widgets_DEFINITONS})
- macro(qt4_add_resources)
- qt5_add_resources(${ARGN})
- set(CMake_QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
- set(QT_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
- # Try to find the package WinExtras for the task bar progress
- find_package(Qt5WinExtras QUIET)
- if (Qt5WinExtras_FOUND)
- include_directories(${Qt5WinExtras_INCLUDE_DIRS})
- add_definitions(-DQT_WINEXTRAS)
- list(APPEND CMake_QT_LIBRARIES ${Qt5WinExtras_LIBRARIES})
- # Remove this when the minimum version of Qt is 4.6.
- add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
- if(CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES)
- list(APPEND CMake_QT_LIBRARIES ${CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES})
- set_property(SOURCE CMakeSetup.cxx
- PROPERTY COMPILE_DEFINITIONS USE_QXcbIntegrationPlugin)
- if(CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES)
- list(APPEND CMake_QT_LIBRARIES ${CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES})
- set_property(SOURCE CMakeSetup.cxx
- PROPERTY COMPILE_DEFINITIONS USE_QWindowsIntegrationPlugin)
- # We need to install platform plugin and add qt.conf for Qt5 on Mac and Windows.
- # FIXME: This should be part of Qt5 CMake scripts, but unfortunately
- # Qt5 support is missing there.
- if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
- macro(install_qt5_plugin _qt_plugin_name _qt_plugins_var)
- get_target_property(_qt_plugin_path "${_qt_plugin_name}" LOCATION)
- if(EXISTS "${_qt_plugin_path}")
- get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME)
- get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH)
- get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
- set(_qt_plugin_dir "PlugIns")