...
 
Commits (12)
......@@ -28,10 +28,21 @@ macro (acg_qt5)
set (QT5_INSTALL_PATH_EXISTS TRUE)
endif()
find_package (Qt5Core QUIET)
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)
foreach (suffix gcc_64 clang_64)
foreach(version ${SUPPORTED_QT_VERSIONS})
list(APPEND QT_DEFAULT_PATH "~/sw/Qt/${version}/${suffix}")
endforeach()
endforeach()
find_package (Qt5Core PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
if(Qt5Core_FOUND)
if(Qt5Core_VERSION) # use the new version variable if it is set
set(Qt5Core_VERSION_STRING ${Qt5Core_VERSION})
endif(Qt5Core_VERSION)
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${Qt5Core_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${Qt5Core_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}")
......@@ -52,41 +63,41 @@ macro (acg_qt5)
#do noot look for Webkit and qt declarative on qt version 5.6 or newer
if(${QT_VERSION_MINOR} GREATER 5)
find_package (Qt5Widgets QUIET)
find_package (Qt5Gui QUIET)
find_package (Qt5OpenGL QUIET)
find_package (Qt5Network QUIET)
find_package (Qt5Script QUIET)
find_package (Qt5ScriptTools QUIET)
find_package (Qt5Sql QUIET)
find_package (Qt5Xml QUIET)
find_package (Qt5XmlPatterns QUIET)
find_package (Qt5Help QUIET)
find_package (Qt5UiTools QUIET)
find_package (Qt5Concurrent QUIET)
find_package (Qt5PrintSupport QUIET)
find_package (Qt5Svg QUIET)
find_package (Qt5Widgets QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Gui QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5OpenGL QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Network QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Script QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5ScriptTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Sql QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Xml QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5XmlPatterns QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Help QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5UiTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Concurrent QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5PrintSupport QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Svg QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
else(${QT_VERSION_MINOR} GREATER 5)
find_package (Qt5Declarative QUIET)
find_package (Qt5Widgets QUIET)
find_package (Qt5Gui QUIET)
find_package (Qt5OpenGL QUIET)
find_package (Qt5Network QUIET)
find_package (Qt5Script QUIET)
find_package (Qt5ScriptTools QUIET)
find_package (Qt5Sql QUIET)
find_package (Qt5Xml QUIET)
find_package (Qt5XmlPatterns QUIET)
find_package (Qt5Help QUIET)
find_package (Qt5WebKit QUIET)
find_package (Qt5UiTools QUIET)
find_package (Qt5Concurrent QUIET)
find_package (Qt5PrintSupport QUIET)
find_package (Qt5Svg QUIET)
find_package (Qt5Declarative QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Widgets QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Gui QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5OpenGL QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Network QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Script QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5ScriptTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Sql QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Xml QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5XmlPatterns QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Help QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5WebKit QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5UiTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Concurrent QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5PrintSupport QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Svg QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
endif(${QT_VERSION_MINOR} GREATER 5)
if (NOT WIN32 AND NOT APPLE)
find_package (Qt5X11Extras QUIET)
find_package (Qt5X11Extras QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
endif ()
if(${QT_VERSION_MINOR} GREATER 5)
......
......@@ -20,9 +20,9 @@ set( CMAKE_CXX_STANDARD 11 )
# ACG Environment default settings
# This is ugly but currently we need to work around the default installed 5.3 on debian
if ( EXISTS /ACG/acgdev/gcc-x86_64/qt-5.8.0/5.8/gcc_64/ )
if ( EXISTS /ACG/acgdev/gcc-x86_64/qt-5.9.0/5.9/gcc_64/ )
# Default to this install path for QT%_INSTALL_DIR
set (QT5_INSTALL_PATH /ACG/acgdev/gcc-x86_64/qt-5.8.0/5.8/gcc_64/ CACHE PATH "Qt5 install path set for ACG environment" )
set (QT5_INSTALL_PATH /ACG/acgdev/gcc-x86_64/qt-5.9.0/5.9/gcc_64/ CACHE PATH "Qt5 install path set for ACG environment" )
endif()
if ( WIN32 )
......@@ -79,7 +79,7 @@ if (NOT QT5_FOUND)
message(FATAL_ERROR "Could not found any QT Version. Please specify QT5_INSTALL_PATH (path to bin and include dir) to build with QT5")
endif()
set (OF_MAX_QT_VERSION "5.6.0")
set (OF_MAX_QT_VERSION "5.9.0")
if (${Qt5Core_VERSION_STRING} STRGREATER ${OF_MAX_QT_VERSION})
message(WARNING "Detected QT Version higher than ${OF_MAX_QT_VERSION}!\n" "OpenFlipper has not been tested with this QT Version.")
......
......@@ -28,10 +28,14 @@ elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
endif()
if (QT5_FOUND)
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.8.0" OR ${Qt5Core_VERSION_STRING} VERSION_GREATER "5.5.1")
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.9.0" )
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.9.0")
else()
if (${Qt5Core_VERSION_STRING} VERSION_EQUAL "5.8.0" OR ${Qt5Core_VERSION_STRING} VERSION_GREATER "5.5.1")
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-x86_64/qwt-6.1.3-qt5.8.0")
else()
else()
SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-4.9-x86_64/qwt-6.1-qt5")
endif()
endif()
else()
SET(ACG_SEARCH_PATH "/usr/local/qwt/")
......@@ -110,13 +114,14 @@ if (QWT6_VERSION_FOUND)
)
# MACOS and LINUX
else()
find_library(QWT6_LIBRARY NAMES qwt-qt5
find_library(QWT6_LIBRARY NAMES qwt qwt-qt5
PATHS
"${ACG_SEARCH_PATH}/lib"
NO_DEFAULT_PATH
NO_CMAKE_PATH
NO_CMAKE_ENVIRONMENT_PATH
)
if (NOT QWT6_LIBRARY) # if not the specific acg qwt installation was found, try system wide
find_library(QWT6_LIBRARY NAMES qwt
PATHS
......