Difference between revisions of "CMake Port/Configure System"

From Qt Wiki
Jump to: navigation, search
Line 1: Line 1:
This is supposed to be a reference of Qt-specific CMake functions one can use in <tt>configure.cmake</tt> files.  
+
This is supposed to be a reference of Qt-specific CMake functions one can use in <tt>configure.cmake</tt> files. Since the port currently is still evolving quite rapidly, things may change. The ultimate reference is the code in [http://code.qt.io/cgit/qt/qtbase.git/tree/cmake?h=wip/cmake qtbase/cmake/].
  
 
== CMake Functions ==
 
== CMake Functions ==

Revision as of 13:28, 11 February 2019

This is supposed to be a reference of Qt-specific CMake functions one can use in configure.cmake files. Since the port currently is still evolving quite rapidly, things may change. The ultimate reference is the code in qtbase/cmake/.

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