Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why we need "CONFIG += install_ok" in module example project files?
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jiancaiyangJ Offline
    jiancaiyangJ Offline
    jiancaiyang
    wrote on last edited by
    #1

    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.

    我们自己的论坛:http://qtdream.com
    擅长三维角色仿真动画。

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What is your point exactly ?

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved