Commit b42e3c51 authored by Jan Möbius's avatar Jan Möbius

Some QT cmake cleanup

parent 1affee38
......@@ -32,7 +32,7 @@ macro (acg_qt5)
set(QT5_FINDER_FLAGS "" CACHE STRING "Flags for the Qt finder e.g.
NO_DEFAULT_PATH if no system installed Qt shall be found")
# compute default search paths
set(SUPPORTED_QT_VERSIONS 5.9 5.8 5.7 5.6)
set(SUPPORTED_QT_VERSIONS 5.11 5.10 5.9 5.8 5.7 5.6)
foreach (suffix gcc_64 clang_64)
foreach(version ${SUPPORTED_QT_VERSIONS})
list(APPEND QT_DEFAULT_PATH "~/sw/Qt/${version}/${suffix}")
......@@ -55,6 +55,7 @@ macro (acg_qt5)
Qt5Svg
Qt5PrintSupport
Qt5Concurrent
Qt5Quick
)
find_package (Qt5Core PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
......@@ -71,19 +72,6 @@ macro (acg_qt5)
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1"
QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}")
# QtWebkit and QtDeclarative deprecated in 5.6
if(${QT_VERSION_MINOR} LESS 6)
list(APPEND QT5_REQUIRED_PACKAGES
Qt5Declarative
Qt5WebKit
)
# QtDeclarative renamed to QtQuick starting from 5.6
else(${QT_VERSION_MINOR} LESS 6)
list(APPEND QT5_REQUIRED_PACKAGES
Qt5Quick
)
endif(${QT_VERSION_MINOR} LESS 6)
# QtX11Extras only on Linux
if(NOT WIN32 AND NOT APPLE)
list(APPEND QT5_REQUIRED_PACKAGES
......@@ -100,55 +88,6 @@ macro (acg_qt5)
endif()
endforeach(QT_PACKAGE)
if (Qt5Core_FOUND AND Qt5Widgets_FOUND
AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND AND Qt5Network_FOUND
AND Qt5Script_FOUND AND Qt5ScriptTools_FOUND AND Qt5Sql_FOUND
AND Qt5Xml_FOUND AND Qt5XmlPatterns_FOUND AND Qt5Help_FOUND
AND Qt5UiTools_FOUND AND Qt5Concurrent_FOUND
AND Qt5PrintSupport_FOUND)
set (QT5_FOUND TRUE)
else()
if (NOT Qt5Core_FOUND)
message(FATAL_ERROR "Qt5Core not found!")
endif()
if (NOT Qt5Widgets_FOUND)
message(FATAL_ERROR "Qt5Widgets not found!")
endif()
if (NOT Qt5Gui_FOUND)
message(FATAL_ERROR "Qt5Gui not found!")
endif()
if (NOT Qt5OpenGL_FOUND)
message(FATAL_ERROR "Qt5OpenGL not found!")
endif()
if (NOT Qt5Network_FOUND)
message(FATAL_ERROR "Qt5Network not found!")
endif()
if (NOT Qt5Script_FOUND)
message(FATAL_ERROR "Qt5Script not found!")
endif()
if (NOT Qt5ScriptTools_FOUND)
message(FATAL_ERROR "Qt5ScriptTools not found!")
endif()
if (NOT Qt5Sql_FOUND)
message(FATAL_ERROR "Qt5Sql not found!")
endif()
if (NOT Qt5Xml_FOUND)
message(FATAL_ERROR "Qt5Xml not found!")
endif()
if (NOT Qt5XmlPatterns_FOUND)
message(FATAL_ERROR "Qt5XmlPatterns not found!")
endif()
if (NOT Qt5Help)
message(FATAL_ERROR "Qt5Help not found!")
endif()
if (NOT Qt5Concurrent_FOUND)
message(FATAL_ERROR "Qt5Concurrent not found!")
endif()
if (NOT Qt5PrintSupport_FOUND)
message(FATAL_ERROR "Qt5PrintSupport not found!")
endif()
endif()
endif(Qt5Core_FOUND)
if (QT5_FOUND)
......@@ -193,8 +132,6 @@ macro (acg_qt5)
set(QT_LIBRARIES ${QT_LIBRARIES} ${Qt5Core_QTMAIN_LIBRARIES})
endif()
#add_definitions(-DQT_NO_OPENGL)
#adding QT_NO_DEBUG to all release modes.
# Note: for multi generators like msvc you cannot set this definition depending of
# the current build type, because it may change in the future inside the ide and not via cmake
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment