Correct way for adding build steps

  • Hello everyone,

    i have a question regarding the generation of additional files with additional compilers.

    So my plan is the following:

    I have 2 compilers: tao_idl.exe and opendds_idl.exe. These Compilers generate 8 files which i need in my project. Now i want these compilers to be called everytime a person hits build in qt creator. How can i realize that. Additionally the solution must be sharable in the ende, so that other persons working on the project can load a file or something and have the possibility to generate the files as well.

    Thank you for your answers.
    Kind Regards,

  • Lifetime Qt Champion


    Do you mean something like described here ?

  • Qt Champions 2017

  • Hey guys,

    thank you for the links. They gave me a lot of interesting information.
    Now there is one problem left.
    This call generates 3 Files. One IDL-File for another preprocessing step, 1 Header and 1 Source File.

    opendds_idl.CONFIG = target_predeps
    opendds_idl.commands = $$OPENDDS_IDL_COMPILER ${QMAKE_FILE_NAME}
    opendds_idl.input = IDL_FILES
    opendds_idl.output = $$IDL_FILES_DIR/${QMAKE_FILE_BASE}TypeSupport.idl
    opendds_idl.variable_out = IDL_FILES_C
    silent:opendds_idl.commands = @echo $$OPENDDS_IDL_COMPILER ${QMAKE_FILE_IN} && $$opendds_idl.commands
    QMAKE_EXTRA_COMPILERS += opendds_idl

    The problem is how can i put the output files in different Output variables? With the variable_out parameter i can select a variable. But i need 3 different variables. The IDL file in IDL_FILES_C, the header file in HEADERS and the source file in SOURCES.

    I hope someone of you has a solution for that.

    Thank you!

  • Lifetime Qt Champion

    I don't think you can do it directly, you might have to do some string processing to split the output into something you can use.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.