Difference between revisions of "CMake Port/Configure System"

From Qt Wiki
Jump to: navigation, search
Line 5: Line 5:
 
=== qt_feature(<name> ...) ===
 
=== qt_feature(<name> ...) ===
  
Declares a Qt feature.  
+
Defines a feature called <name>.  Whether a feature is enabled can be then elsewhere be checked by <tt>QT_FEATURE_<name></tt>.
  
<code>qt_feature(<name> [PRIVATE] [PUBLIC]  
+
<code>qt_feature("<name>" [PUBLIC] [PRIVATE]
                 [LABEL <label>]  
+
                 [LABEL "<label>"]  
                 [PURPOSE <purpose>]  
+
                 [PURPOSE "<purpose>"]  
                 [SECTION <selection>]  
+
                 [SECTION "<selection>"]  
 
                 [AUTODETECT <condition>]  
 
                 [AUTODETECT <condition>]  
 
                 [CONDITION <condition>]
 
                 [CONDITION <condition>]
Line 17: Line 17:
 
                 [EMIT_IF <condition>])</code>
 
                 [EMIT_IF <condition>])</code>
  
Defines a feature called <name> .  
+
<tt>PUBLIC</tt> or <tt>PRIVATE</tt> defines whether the feature is available within the Qt module, or also in other Qt modules.
  
=== qt_evaluate_feature ===
+
=== qt_feature_definition("<name>" ...) ===
  
Declares a Qt feature.
+
TODO
 
 
== CMake Macros ==
 
 
 
=== qt_parse_all_arguments ===
 
 
 
A version of cmake_parse_arguments that makes sure all arguments are processed and errors out with a message about ${type} having received unknown arguments.
 
 
 
''Internal API.''
 
 
 
<code>qt_parse_all_arguments(<result> <type> <flags> <options> <multiopts>)</code>
 

Revision as of 13:25, 11 February 2019

This is supposed to be a reference of Qt-specific CMake functions one can use in configure.cmake files.

CMake Functions

qt_feature(<name> ...)

Defines a feature called <name>. Whether a feature is enabled can be then elsewhere be checked by QT_FEATURE_<name>.

qt_feature("<name>" [PUBLIC] [PRIVATE]

               [LABEL "<label>"] 
               [PURPOSE "<purpose>"] 
               [SECTION "<selection>"] 
               [AUTODETECT <condition>] 
               [CONDITION <condition>]
               [ENABLE <condition>]
               [DISABLE <condition>]
               [EMIT_IF <condition>])

PUBLIC or PRIVATE defines whether the feature is available within the Qt module, or also in other Qt modules.

qt_feature_definition("<name>" ...)

TODO