Commit 0d2ec9a2 authored by Martin Schultz's avatar Martin Schultz

* changed finder paths to look for gcc and clang builds

* Added variable for flags to pass to the Qt finder. Use
NO_DEFAULT_PATHS when no system installed Qt should be used.
keep flags empty if the system installed version is to be used
parent 93a81850
......@@ -28,13 +28,17 @@ macro (acg_qt5)
set (QT5_INSTALL_PATH_EXISTS TRUE)
endif()
#default search paths for OS X
set(QT_DEFAULT_PATH ~/sw/Qt/5.9/clang_64
~/sw/Qt/5.8/clang_64
~/sw/Qt/5.7/clang_64
~/sw/Qt/5.6/clang_64
)
find_package (Qt5Core QUIET PATHS ${QT_DEFAULT_PATH})
set(QT5_FINDER_FLAGS "NO_DEFAULT_PATH" 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})
......@@ -59,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 PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Gui QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5OpenGL QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Network QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Script QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5ScriptTools QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Sql QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Xml QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5XmlPatterns QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Help QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5UiTools QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Concurrent QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5PrintSupport QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Svg QUIET PATHS ${QT_DEFAULT_PATH})
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 PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Widgets QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Gui QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5OpenGL QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Network QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Script QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5ScriptTools QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Sql QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Xml QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5XmlPatterns QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Help QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5WebKit QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5UiTools QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Concurrent QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5PrintSupport QUIET PATHS ${QT_DEFAULT_PATH})
find_package (Qt5Svg QUIET PATHS ${QT_DEFAULT_PATH})
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 PATHS ${QT_DEFAULT_PATH})
find_package (Qt5X11Extras QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS})
endif ()
if(${QT_VERSION_MINOR} GREATER 5)
......
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