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

Why we need "CONFIG += install_ok" in module example project files?



  • As this post mentioned: https://forum.qt.io/topic/74921/configure-qt-project-with-plugins

    I am definitely thinking CONFIG += install_ok is useless, which however many of the Qt modules example use it. This originate from qt_example_installs.prf file.

        equals(TEMPLATE, app)|equals(TEMPLATE, lib) {
            !contains(INSTALLS, target) {
                !install_ok: \
                    error("$$_PRO_FILE_ is lacking an install target.")
                else: check_examples: \
                    warning("$$_PRO_FILE_ is lacking an install target.")
            } else: !equals(target.path, $$sources.path) {
                !install_ok: \
                    error("$$_PRO_FILE_ installs target to unexpected location.")
                else: check_examples: \
                    warning("$$_PRO_FILE_ installs target to unexpected location.")
            }
        }
    

    Why we have to check installation ok? as with many Qt module examples, this configuration install_ok does not check all, many follows a comment:

    CONFIG += install_ok  # Do not cargo-cult this!
    

    In summary I think this configuration check should not be in the prf file.


  • Lifetime Qt Champion

    Hi,

    What is your point exactly ?

    Qt's examples are meant to be installed as part of Qt's own installation.


Log in to reply