Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
2eec2c15
There was an error fetching the commit references. Please try again later.
Commit
2eec2c15
authored
9 years ago
by
Yuri Kunde Schlesner
Browse files
Options
Downloads
Patches
Plain Diff
CMake: Use HINTS option instead of modifying CMAKE_PREFIX_PATH for Qt
parent
078969bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+11
-4
11 additions, 4 deletions
CMakeLists.txt
with
11 additions
and
4 deletions
CMakeLists.txt
+
11
−
4
View file @
2eec2c15
...
...
@@ -189,22 +189,29 @@ if (ENABLE_QT)
if
(
DEFINED QT_VER
)
download_bundled_external
(
"qt/"
${
QT_VER
}
QT_PREFIX
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
QT_PREFIX
}
"
)
endif
()
elseif
(
DEFINED ENV{QTDIR}
)
# Set CMAKE_PREFIX_PATH if QTDIR is defined in the environment This allows CMake to
# automatically find the Qt packages on Windows
list
(
APPEND CMAKE_PREFIX_PATH
"$ENV{QTDIR}"
)
set
(
QT_PREFIX
"$ENV{QTDIR}"
)
endif
()
# Passing an empty HINTS seems to cause default system paths to get ignored in CMake 2.8 so make
# sure to not pass anything if we don't have one
if
(
DEFINED QT_PREFIX
)
set
(
QT_PREFIX_HINT HINTS
"
${
QT_PREFIX
}
"
)
else
()
set
(
QT_PREFIX_HINT
)
endif
()
if
(
NOT CITRA_FORCE_QT4
)
find_package
(
Qt5 COMPONENTS Widgets OpenGL
)
find_package
(
Qt5 COMPONENTS Widgets OpenGL
${
QT_PREFIX_HINT
}
)
set
(
CITRA_QT_LIBS Qt5::Widgets Qt5::OpenGL
)
endif
()
if
(
CITRA_FORCE_QT4 OR NOT Qt5_FOUND
)
# Try to fallback to Qt4
find_package
(
Qt4 REQUIRED COMPONENTS QtGui QtOpenGL
)
find_package
(
Qt4 REQUIRED COMPONENTS QtGui QtOpenGL
${
QT_PREFIX_HINT
}
)
set
(
CITRA_QT_LIBS Qt4::QtGui Qt4::QtOpenGL
)
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment