Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8159545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:57:15+00:00 2026-06-06T17:57:15+00:00

qmake generates the following (among the others) rule for installing a target: -$(INSTALL_PROGRAM) $(TARGET)

  • 0

qmake generates the following (among the others) rule for installing a target:

-$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(TARGET)"

I cannot set INSTALL_ROOT with something like this in a *.pro file

isEmpty(INSTALL_ROOT) {
    INSTALL_ROOT=/usr
}

because INSTALL_ROOT is somehow local to generated Makefiles. According to what I’ve found out so far INSTALL_ROOT is empty by default. It could be used like

INSTALL_ROOT=$HOME make install

when invoking make, which is fine. However I want to be able to specify default installation root, say /usr. I can do it introducing a new variable PREFIX as suggested here.
Then generated rule will look like (if PREFIX was set to /usr)

-$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/usr/$(TARGET)"

however

INSTALL_ROOT=$HOME make install

installs target to /home/<user_name>/usr/$(TARGET) which is not that one would expect.

So setting INSTALL_ROOT to some default value will produce consistent behavior, which is superior to adding PREFIX, but how to set INSTALL_ROOT in a *.pro file?

What is the purpose of INSTALL_ROOT is it supposed to be used at all?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:57:16+00:00Added an answer on June 6, 2026 at 5:57 pm

    I’m answering for Windows here. You appear to be using UNIX, Linux, or Mac OS X so you may have to make a few changes.

    INSTALL_ROOT is a poorly documented feature that appears to have been added so that those without root or admin access can install Qt in their local filesystem. It’s actually a bit of a hack since, as you have already seen, it is not possible to specify an arbitrary target, but you can always move the files to the desired location afterwards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a (partial) qmake project file like this: TEMPLATE=lib TARGET=whatever SOURCES=whatever.cpp HEADERS=whatever.h This
Do the following build systems: cmake, jam and bjam also generate makefiles like qmake
When I run make (after running qmake) I get the following error: /usr/bin/ld: cannot
In this qmake code: MY_COMPILER = mingw warning($$MY_COMPILER) contains(MY_COMPILER, mingw) { INCLUDEPATH += ../../libsrc/Qwt/qwt-6.0.1-win-Qt-4.8.0/src
I downloaded Qt SDK and set up paths for qmake etc commands. Now I'm
I have a problem with qmake and the make file that it generates. My
I've the following definition in my .pro file: RC_FILE = app.rc This RC file
I have this tiny Qt project with a project file like this: TEMPLATE =
I use qmake (Qt 4.5.1) to create my vcproj files. I would like to
I'm using qmake for building a project of mine. I have been trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.