summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-09-07 23:32:53 -0300
committerGravatar Yuri Kunde Schlesner2015-09-08 19:35:14 -0300
commit70d0d8890aff351f33c1b661c8afba50834eed41 (patch)
tree799e563ad140ee2f13beba6506c7f0d8754be233
parentCMake: Don't complain when Boost isn't found in the system. (diff)
downloadyuzu-70d0d8890aff351f33c1b661c8afba50834eed41.tar.gz
yuzu-70d0d8890aff351f33c1b661c8afba50834eed41.tar.xz
yuzu-70d0d8890aff351f33c1b661c8afba50834eed41.zip
CMake: Remove support for QTDIR environment variable
Using this variable is problematic is the user has several versions of Qt installed on their system. There is no way to know ahead of time if the Qt version pointed to by QTDIR matches the toolchain that is being targeted. The Qt installation path can still be easily specified if it's not found by CMake by setting the Qt5_DIR cache variable after the initial configuration run, so this shouldn't present an usability issue.
-rw-r--r--CMakeLists.txt10
-rw-r--r--appveyor.yml2
2 files changed, 3 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b619e06fb..55880990c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -190,17 +190,11 @@ if (ENABLE_QT)
190 if (DEFINED QT_VER) 190 if (DEFINED QT_VER)
191 download_bundled_external("qt/" ${QT_VER} QT_PREFIX) 191 download_bundled_external("qt/" ${QT_VER} QT_PREFIX)
192 endif() 192 endif()
193 elseif (DEFINED ENV{QTDIR})
194 # Set CMAKE_PREFIX_PATH if QTDIR is defined in the environment This allows CMake to
195 # automatically find the Qt packages on Windows
196 set(QT_PREFIX "$ENV{QTDIR}")
197 endif()
198 193
199 # Passing an empty HINTS seems to cause default system paths to get ignored in CMake 2.8 so make
200 # sure to not pass anything if we don't have one
201 if (DEFINED QT_PREFIX)
202 set(QT_PREFIX_HINT HINTS "${QT_PREFIX}") 194 set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
203 else() 195 else()
196 # Passing an empty HINTS seems to cause default system paths to get ignored in CMake 2.8 so
197 # make sure to not pass anything if we don't have one.
204 set(QT_PREFIX_HINT) 198 set(QT_PREFIX_HINT)
205 endif() 199 endif()
206 200
diff --git a/appveyor.yml b/appveyor.yml
index 4d6f53f96..6e073ece7 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -18,7 +18,7 @@ install:
18before_build: 18before_build:
19 - mkdir build 19 - mkdir build
20 - cd build 20 - cd build
21 - cmake -G "Visual Studio 12 Win64" -DCITRA_USE_BUNDLED_GLFW=1 .. 21 - cmake -G "Visual Studio 12 Win64" -DCITRA_USE_BUNDLED_GLFW=1 -DQt5_DIR=%QTDIR%/lib/cmake/Qt5 ..
22 - cd .. 22 - cd ..
23 23
24after_build: 24after_build: