Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator Projects tab CMake Build steps "Stage for installation"
Forum Updated to NodeBB v4.3 + New Features

Qt Creator Projects tab CMake Build steps "Stage for installation"

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 2 Posters 726 Views
  • 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.
  • R Offline
    R Offline
    Richard Lang
    wrote on last edited by
    #1

    Can anyone shed any light on how the new "Stage for installation" checkbox added in Qt Creator 11 to the Project tab CMake build steps actually works?

    Running on Ubuntu 22.04 build host

    It's caused me grief in a situation where my CMake super-project builds a sub-project pulled in using ExternalProject_Add() and performs a faux-install of the subproject with path specified by CMAKE_INSTALL_PREFIX in order for the superproject to be able to access resources generated by the subproject without having to dig deep into it's internal build folders. With "Stage for installation" turned on the install occurs in the associated temporary staging directory with my CMAKE_INSTALL_PREFIX value appended.

    I've figured out what's going on and obviously can turn "Stage for installation" off, however I'd prefer to enhance my scripts to handle it, however it's not at all clear exactly how Qt Creator is specifying/imposing the "Stage for installation" path on the CMake configure & build process and how I can detect that it is in effect from within my script. It doe not appear to be part of the CMake invocation command line, in particular does not seem to be present in CMAKE_INSTALL_PREFIX

    cristian-adamC 1 Reply Last reply
    0
    • cristian-adamC cristian-adam

      Qt Creator sets the environment variable DESTDIR for that purpose.

      See https://devdocs.io/cmake~3.24/envvar/destdir for more information.

      cristian-adamC Offline
      cristian-adamC Offline
      cristian-adam
      wrote on last edited by
      #3

      And at https://gitlab.kitware.com/cmake/cmake/-/issues/18165 there is an issue regarding DESTDIR and ExternalProject_Add with a workaround!

      R 1 Reply Last reply
      1
      • R Richard Lang

        Can anyone shed any light on how the new "Stage for installation" checkbox added in Qt Creator 11 to the Project tab CMake build steps actually works?

        Running on Ubuntu 22.04 build host

        It's caused me grief in a situation where my CMake super-project builds a sub-project pulled in using ExternalProject_Add() and performs a faux-install of the subproject with path specified by CMAKE_INSTALL_PREFIX in order for the superproject to be able to access resources generated by the subproject without having to dig deep into it's internal build folders. With "Stage for installation" turned on the install occurs in the associated temporary staging directory with my CMAKE_INSTALL_PREFIX value appended.

        I've figured out what's going on and obviously can turn "Stage for installation" off, however I'd prefer to enhance my scripts to handle it, however it's not at all clear exactly how Qt Creator is specifying/imposing the "Stage for installation" path on the CMake configure & build process and how I can detect that it is in effect from within my script. It doe not appear to be part of the CMake invocation command line, in particular does not seem to be present in CMAKE_INSTALL_PREFIX

        cristian-adamC Offline
        cristian-adamC Offline
        cristian-adam
        wrote on last edited by
        #2

        Qt Creator sets the environment variable DESTDIR for that purpose.

        See https://devdocs.io/cmake~3.24/envvar/destdir for more information.

        cristian-adamC 1 Reply Last reply
        0
        • cristian-adamC cristian-adam

          Qt Creator sets the environment variable DESTDIR for that purpose.

          See https://devdocs.io/cmake~3.24/envvar/destdir for more information.

          cristian-adamC Offline
          cristian-adamC Offline
          cristian-adam
          wrote on last edited by
          #3

          And at https://gitlab.kitware.com/cmake/cmake/-/issues/18165 there is an issue regarding DESTDIR and ExternalProject_Add with a workaround!

          R 1 Reply Last reply
          1
          • cristian-adamC cristian-adam

            And at https://gitlab.kitware.com/cmake/cmake/-/issues/18165 there is an issue regarding DESTDIR and ExternalProject_Add with a workaround!

            R Offline
            R Offline
            Richard Lang
            wrote on last edited by
            #4

            @cristian-adam thanks cristian, that's what I'm after

            1 Reply Last reply
            0
            • R Richard Lang has marked this topic as solved on

            • Login

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