diff options
Diffstat (limited to '')
| -rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f7b0af115..9a436b981 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -40,7 +40,6 @@ option(CITRA_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" OFF) | |||
| 40 | 40 | ||
| 41 | option(ENABLE_QT "Enable the Qt frontend" ON) | 41 | option(ENABLE_QT "Enable the Qt frontend" ON) |
| 42 | option(CITRA_USE_BUNDLED_QT "Download bundled Qt binaries" OFF) | 42 | option(CITRA_USE_BUNDLED_QT "Download bundled Qt binaries" OFF) |
| 43 | option(CITRA_FORCE_QT4 "Use Qt4 even if Qt5 is available." OFF) | ||
| 44 | 43 | ||
| 45 | if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit) | 44 | if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit) |
| 46 | message(STATUS "Copying pre-commit hook") | 45 | message(STATUS "Copying pre-commit hook") |
| @@ -201,16 +200,8 @@ if (ENABLE_QT) | |||
| 201 | set(QT_PREFIX_HINT) | 200 | set(QT_PREFIX_HINT) |
| 202 | endif() | 201 | endif() |
| 203 | 202 | ||
| 204 | if (NOT CITRA_FORCE_QT4) | 203 | find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT}) |
| 205 | find_package(Qt5 COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT}) | 204 | set(CITRA_QT_LIBS Qt5::Widgets Qt5::OpenGL) |
| 206 | set(CITRA_QT_LIBS Qt5::Widgets Qt5::OpenGL) | ||
| 207 | endif() | ||
| 208 | |||
| 209 | if (CITRA_FORCE_QT4 OR NOT Qt5_FOUND) | ||
| 210 | # Try to fallback to Qt4 | ||
| 211 | find_package(Qt4 REQUIRED COMPONENTS QtGui QtOpenGL ${QT_PREFIX_HINT}) | ||
| 212 | set(CITRA_QT_LIBS Qt4::QtGui Qt4::QtOpenGL) | ||
| 213 | endif() | ||
| 214 | endif() | 205 | endif() |
| 215 | 206 | ||
| 216 | # This function should be passed a list of all files in a target. It will automatically generate | 207 | # This function should be passed a list of all files in a target. It will automatically generate |