zoukankan      html  css  js  c++  java
  • Qt5Core macros

    http://doc.qt.io/qt-5/cmake-manual.html

    Qt5DBus macros

    Macros available when Qt5DBus is found.

    MacroDescription
    qt5_add_dbus_interface(outfiles interface basename) Create the interface header and implementation files with the given basename from the given interface xml file and add it to the list of sources
    qt5_add_dbus_interfaces(outfiles inputfile ... ) Create the interface header and implementation files for all listed interface xml files the name will be automatically determined from the name of the xml file
    qt5_add_dbus_adaptor(outfiles xmlfile parentheader parentclassname [basename] [classname]) Create a dbus adaptor (header and implementation file) from the xml file describing the interface, and add it to the list of sources. The adaptor forwards the calls to a parent class, defined in parentheader and named parentclassname. The name of the generated files will be <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file. If <classname> is provided, then it will be used as the classname of the adaptor itself.
    qt5_generate_dbus_interface( header [interfacename] OPTIONS ...) Generate the xml interface file from the given header. If the optional argument interfacename is omitted, the name of the interface file is constructed from the basename of the header with the suffix .xml appended. Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"

    Qt5LinguistTools macros

    Macros available when Qt5LinguistTools is found.

    MacroDescription
    qt5_create_translation( qm_files directories ... sources ... ts_files ... OPTIONS ...) Out: qm_files In: Directories sources ts_files Options: flags to pass to lupdate, such as -extensions to specify Extensions for a directory scan. Generates commands to create .ts (via lupdate) and .qm (via lrelease) - files from directories and/or sources. The ts files are created and/or updated in the source tree (unless given with full paths). The qm files are generated in the build tree. Updating the translations can be done by adding the qm_files to the source list of your library/executable, so they are always updated, or by adding a custom target to control when they get updated/generated.
    qt5_add_translation( qm_files ts_files ... ) Out: qm_files In: ts_files Generates commands to create .qm from .ts - files. The generated filenames can be found in qm_files. The ts_files must exist and are not updated in any way.

    Qt5Widgets macros

    Macros available when Qt5Widgets is found.

    MacroDescription
    qt5_wrap_ui(outfiles inputfile ... OPTIONS ...) Create code from a list of Qt designer ui files. Options may be given to uic, such as those found when executing "uic -help"

    Qt5Core macros

    Macros available when Qt5Core is found.

    MacroDescription
    qt5_wrap_cpp(outfiles inputfile ... OPTIONS ...) Create moc code from a list of files containing Qt class with the Q_OBJECT declaration. Per-directory preprocessor definitions are also added. Options may be given to moc, such as those found when executing "moc -help".
    qt5_add_resources(outfiles inputfile ... OPTIONS ...) Create code from a list of Qt resource files. Options may be given to rcc, such as those found when executing "rcc -help".
    qt5_add_binary_resources(target inputfile ... OPTIONS ... DESTINATION ...) Create an RCC file from a list of Qt resource files. Options may be given to rcc, such as those found when executing "rcc -help". A destination may be given to use a different filename or path for the RCC file.
    qt5_generate_moc(inputfile outputfile ) Creates a rule to run moc on infile and create outfile. Use this if for some reason QT5_WRAP_CPP() isn't appropriate, e.g. because you need a custom filename for the moc file or something similar.
    qt5_use_modules(target [LINK_PUBLIC|LINK_PRIVATE] module ... ) Indicates that the target uses the named Qt 5 modules. The target will be linked to the specified modules, use the include directories installed by those modules, use the COMPILE_DEFINITIONS set by those modules, and use the COMPILE_FLAGS set by the modules. The LINK_PRIVATE or LINK_PUBLIC specifiers can optionally be specified. If LINK_PRIVATE is specified then the modules are not made part of the link interface of the target. See the documentation for target_link_libraries for more information.

    Note that this macro is only available if using CMake 2.8.9 or later. This macro is obsolete. Use target_link_libraries with IMPORTED targets instead.

  • 相关阅读:
    Swing程序最佳架构设计—以业务对象为中心的MVC模式(转)
    股市投资策略总结(转)
    php学习笔记--高级教程--读取文件、创建文件、写入文件
    史上最简单的Hibernate入门简单介绍
    Java中StringBuilder的清空方法比較
    DHCP Option 60 的理解
    ICMP报文分析
    软件測试自学指南---从入门到精通
    Qt多线程学习:创建多线程
    Bulk Insert命令具体
  • 原文地址:https://www.cnblogs.com/Searchor/p/6855577.html
Copyright © 2011-2022 走看看