Commit 2827e283 authored by Martin Schultz's avatar Martin Schultz
Browse files

Merge branch 'master' into featureQueuedCrossPluginConnect

parents 7a0d73a1 326249f6
...@@ -23,73 +23,56 @@ macro (acg_qt5) ...@@ -23,73 +23,56 @@ macro (acg_qt5)
#try to find qt5 automatically #try to find qt5 automatically
#for custom installation of qt5, dont use any of these variables #for custom installation of qt5, dont use any of these variables
set (QT5_INSTALL_PATH "" CACHE PATH "Path to Qt5 directory which contains lib and include folder") set (QT5_INSTALL_PATH "" CACHE PATH "Path to Qt5 directory which contains lib and include folder")
if (EXISTS "${QT5_INSTALL_PATH}") if (EXISTS "${QT5_INSTALL_PATH}")
set (CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${QT5_INSTALL_PATH}") set (CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${QT5_INSTALL_PATH}")
set (QT5_INSTALL_PATH_EXISTS TRUE) set (QT5_INSTALL_PATH_EXISTS TRUE)
endif() endif(EXISTS "${QT5_INSTALL_PATH}")
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 QUIET) find_package (Qt5Core PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
if(Qt5Core_FOUND) if(Qt5Core_FOUND)
if(Qt5Core_VERSION) # use the new version variable if it is set if(Qt5Core_VERSION) # use the new version variable if it is set
set(Qt5Core_VERSION_STRING ${Qt5Core_VERSION}) set(Qt5Core_VERSION_STRING ${Qt5Core_VERSION})
endif(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_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_MINOR "${Qt5Core_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}") string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}")
#find WINDOWS_SDK to avoid qt error. This must be done BEFORE Qt5Widgets is searched find_package (Qt5Widgets QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
if (WIN32) find_package (Qt5Gui QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
if ( (QT_VERSION_MAJOR EQUAL 5) AND (QT_VERSION_MINOR LESS 3 OR ( QT_VERSION_MINOR EQUAL 3 AND QT_VERSION_PATCH EQUAL 0 )) ) # for all Qt version > 5.0.0 and < 5.3.1 find_package (Qt5OpenGL QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
#glu32.lib is needed by qt5 opengl version. it cannot find it by itself so we help qt find_package (Qt5Network QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
#this block has to be executed, before Qt5Gui is searched, otherwise we will end up with the (not so useful) QT5 error message find_package (Qt5Sql QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
set(WINDOWS_SDK_LIBS "COULD_NOT_FOUND" CACHE PATH "Path to the latest windows sdk libs which includes glu32.lib. Used by Qt5.") find_package (Qt5Script QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
if (EXISTS "${WINDOWS_SDK_LIBS}\\glu32.lib") find_package (Qt5ScriptTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
set (CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${WINDOWS_SDK_LIBS}") find_package (Qt5Xml QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
elseif(QT5_INSTALL_PATH_EXISTS) #trying to install qt5. notify about missing sdk before the qt message comes find_package (Qt5XmlPatterns QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
message(FATAL_ERROR "Could not find glu32.lib. This is necessary for QT5 OpenGL version for windows, spleace specify glu32.lib in WINDOWS_SDK_LIB or install Qt version >= 5.3.1") find_package (Qt5Help QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
endif() find_package (Qt5UiTools QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
endif() find_package (Qt5Svg QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
endif(WIN32) find_package (Qt5PrintSupport QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Concurrent QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
#do noot look for Webkit and qt declarative on qt version 5.6 or newer #do noot look for Webkit and qt declarative on qt version 5.6 or newer
if(${QT_VERSION_MINOR} GREATER 5) if(${QT_VERSION_MINOR} LESS 6)
find_package (Qt5Widgets QUIET) find_package (Qt5Declarative QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5Gui QUIET) find_package (Qt5WebKit QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
find_package (Qt5OpenGL QUIET) endif(${QT_VERSION_MINOR} LESS 6)
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)
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)
endif(${QT_VERSION_MINOR} GREATER 5)
if (NOT WIN32 AND NOT APPLE) if (NOT WIN32 AND NOT APPLE)
find_package (Qt5X11Extras QUIET) find_package (Qt5X11Extras QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
endif () endif ()
if(${QT_VERSION_MINOR} GREATER 5) if(${QT_VERSION_MINOR} GREATER 5)
......
...@@ -20,9 +20,9 @@ set( CMAKE_CXX_STANDARD 11 ) ...@@ -20,9 +20,9 @@ set( CMAKE_CXX_STANDARD 11 )
# ACG Environment default settings # ACG Environment default settings
# This is ugly but currently we need to work around the default installed 5.3 on debian # 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 # 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() endif()
if ( WIN32 ) if ( WIN32 )
...@@ -79,7 +79,7 @@ if (NOT QT5_FOUND) ...@@ -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") 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() 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}) 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.") message(WARNING "Detected QT Version higher than ${OF_MAX_QT_VERSION}!\n" "OpenFlipper has not been tested with this QT Version.")
......
...@@ -28,11 +28,15 @@ elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" ) ...@@ -28,11 +28,15 @@ elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
endif() endif()
if (QT5_FOUND) if (QT5_FOUND)
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") 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") 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") SET(ACG_SEARCH_PATH "/ACG/acgdev/gcc-4.9-x86_64/qwt-6.1-qt5")
endif() endif()
endif()
else() else()
SET(ACG_SEARCH_PATH "/usr/local/qwt/") SET(ACG_SEARCH_PATH "/usr/local/qwt/")
endif() endif()
...@@ -110,9 +114,10 @@ if (QWT6_VERSION_FOUND) ...@@ -110,9 +114,10 @@ if (QWT6_VERSION_FOUND)
) )
# MACOS and LINUX # MACOS and LINUX
else() else()
find_library(QWT6_LIBRARY NAMES qwt-qt5 find_library(QWT6_LIBRARY NAMES qwt qwt-qt5
PATHS PATHS
"${ACG_SEARCH_PATH}/lib" "${ACG_SEARCH_PATH}/lib"
NO_DEFAULT_PATH
NO_CMAKE_PATH NO_CMAKE_PATH
NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH
) )
......
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