Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
691ac05d
Commit
691ac05d
authored
Dec 03, 2012
by
Clinton Stimpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: Add SYSTEM option to include_directories.
Thanks to Scott Bailey and Benjamin Kloster.
parent
538af164
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
Modules/FindQt4.cmake
Modules/FindQt4.cmake
+4
-0
Modules/UseQt4.cmake
Modules/UseQt4.cmake
+10
-2
No files found.
Modules/FindQt4.cmake
View file @
691ac05d
...
...
@@ -65,6 +65,10 @@
# is much more flexible, but requires that FindQt4.cmake is executed before
# such an exported dependency file is processed.
#
# QT_INCLUDE_DIRS_NO_SYSTEM
# If this variable is set to TRUE, the Qt include directories
# in the QT_USE_FILE will NOT have the SYSTEM keyword set.
#
# There are also some files that need processing by some Qt tools such as moc
# and uic. Listed below are macros that may be used to process those files.
#
...
...
Modules/UseQt4.cmake
View file @
691ac05d
...
...
@@ -25,7 +25,11 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set_property
(
DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG
)
endif
()
include_directories
(
${
QT_INCLUDE_DIR
}
)
if
(
QT_INCLUDE_DIRS_NO_SYSTEM
)
include_directories
(
${
QT_INCLUDE_DIR
}
)
else
(
QT_INCLUDE_DIRS_NO_SYSTEM
)
include_directories
(
SYSTEM
${
QT_INCLUDE_DIR
}
)
endif
(
QT_INCLUDE_DIRS_NO_SYSTEM
)
set
(
QT_LIBRARIES
""
)
set
(
QT_LIBRARIES_PLUGINS
""
)
...
...
@@ -89,7 +93,11 @@ foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
if
(
QT_USE_
${
module
}
)
string
(
REPLACE
"QT"
""
qt_module_def
"
${
module
}
"
)
add_definitions
(
-DQT_
${
qt_module_def
}
_LIB
)
include_directories
(
${
QT_
${
module
}
_INCLUDE_DIR
}
)
if
(
QT_INCLUDE_DIRS_NO_SYSTEM
)
include_directories
(
${
QT_
${
module
}
_INCLUDE_DIR
}
)
else
(
QT_INCLUDE_DIRS_NO_SYSTEM
)
include_directories
(
SYSTEM
${
QT_
${
module
}
_INCLUDE_DIR
}
)
endif
(
QT_INCLUDE_DIRS_NO_SYSTEM
)
endif
()
set
(
QT_LIBRARIES
${
QT_LIBRARIES
}
${
QT_
${
module
}
_LIBRARY
}
)
set
(
QT_LIBRARIES_PLUGINS
${
QT_LIBRARIES_PLUGINS
}
${
QT_
${
module
}
_PLUGINS
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment