qt_ifcodegen_generate

Generates files from a qface IDL file.

The command is defined in the InterfaceFramework component of the Qt6 package.

Load the package with:

find_package(Qt6 REQUIRED COMPONENTS InterfaceFramework)

Synopsis

qt_ifcodegen_generate(
    IDL_FILES idl_files
    TEMPLATE template
    [ANNOTATION_FILES ...]
    [IMPORT_PATH ...]
    [OUTPUT_DIR output_dir]
    [EXTRA_HEADERS_OUTPUT_DIR extra_headers_output_dir]
    [EXTRA_TEMPLATE_SEARCH_PATH ...]
    [VERBOSE]
)

If versionless commands are disabled, use qt6_ifcodegen_generate() instead. It supports the same set of arguments as this command.

Description

Generates files from a qface Interface Definition Language (IDL) file by invoking ifcodegen. It would normally be called internally by qt_ifcodegen_extend_target or qt_ifcodegen_import_variables. You should not call this function directly unless you have special circumstances that require you to generate files by invoking ifcodegen, but not use them within CMake in any way.

The input IDL file is specified using IDL_FILES, while TEMPLATE specifies the ifcodegen template used for the generation. The given template either needs to be a path to a template folder or a name of a template found in the template search path. Using the EXTRA_TEMPLATE_SEARCH_PATH argument, it is possible to extend the search path. This is especially useful if you want to use your own templates for the code generation. As an alternative to the function argument the QT_IFCODEGEN_TEMPLATE_SEARCH_PATH global CMake variable can be used to specify an extra search path for all ifcodegen function calls.

Additional annotation files are passed by the ANNOTATION_FILES argument.

IDL_IMPORT_PATH can be used to add to the search paths where IDL files that this one depends on can be found. The other IDL files still need to be generated and built on their own.

OUTPUT_DIR specifies the directory where the generated files will be written to and defaults to CMAKE_CURRENT_BINARY_DIR.

EXTRA_HEADER_OUTPUT_DIR is used to provide an extra directory where all generated header files are copied to.

By default all log messages generated by ifcodegen are discarded. To show them you can use the VERBOSE argument, set the IFCODEGEN_VERBOSE variable or use set CMAKE_MESSAGE_LOG_LEVEL to VERBOSE.

For more details on the generator's command line arguments, see Use the Generator.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.