Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

qmake generate config file



  • Hi,
    During make install step binaries and libraries are copied. Those files aren't placed in standard or natural linux locations.
    To simplify start process I would like do generate shell script (or config file containing paths) which will run main app with supporting app and for both set proper LD_LIBRARY_PATH and PATH.
    In simplest form it would be something like

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<install_dir_lib>
    PATH=$PATH:<install_dir_bins> 
    supporting app &
    main_app
    

    Let's treat this as a base.
    In CMake I can use CONFIGURE_FILE which will take template file and fill it with values gathered during configure phase.
    How to achieve something similar in qmake?


  • Lifetime Qt Champion

    Hi,

    Use QMAKE_SUBSTITUTES.

    There's a nice article here about that.



  • @SGaist
    Thank you, that's what I needed.


Log in to reply