From 5daeea221ec519b825c5c012a6f2b3853d77123f Mon Sep 17 00:00:00 2001 From: Sebastian Eichelbaum Date: Fri, 6 Mar 2015 17:50:47 +0100 Subject: [PATCH] [FIX #385] our cmake script now allows setting the environment variable "QTDIR" to point cmake to the right Qt directory, even if Qt5 is installed inside the system prefixes --- src/qt5gui/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qt5gui/CMakeLists.txt b/src/qt5gui/CMakeLists.txt index 4cdf85410..a81c79638 100644 --- a/src/qt5gui/CMakeLists.txt +++ b/src/qt5gui/CMakeLists.txt @@ -39,6 +39,15 @@ SET( BinName "openwalnut-qt5" ) # Setup QT5 # --------------------------------------------------------------------------------------------------------------------------------------------------- +# Special handling if the user specified a QT path manually. Useful when using multiple installations of Qt. +IF( DEFINED ENV{QTDIR} ) + MESSAGE( "Using custom Qt path. Ensure you set the path to the directory containing the bin and lib directories." ) + SET( CMAKE_PREFIX_PATH "$ENV{QTDIR}/lib/cmake/Qt5Widgets" ${CMAKE_PREFIX_PATH} ) + SET( CMAKE_PREFIX_PATH "$ENV{QTDIR}/lib/cmake/Qt5OpenGL" ${CMAKE_PREFIX_PATH} ) + SET( CMAKE_PREFIX_PATH "$ENV{QTDIR}/lib/cmake/Qt5WebKitWidgets" ${CMAKE_PREFIX_PATH} ) + SET( CMAKE_PREFIX_PATH $ENV{QTDIR} ${CMAKE_PREFIX_PATH} ) +endif() + # Package dependencies: FIND_PACKAGE( Qt5Widgets REQUIRED ) FIND_PACKAGE( Qt5OpenGL REQUIRED ) -- GitLab