<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[qmake shadow build problem using QMAKE_EXTRA_COMPILERS]]></title><description><![CDATA[<p dir="auto">QMake version 3.1<br />
Qt version 5.9.7 (also tried in 5.15.2)</p>
<p dir="auto">I created a simple project that demonstrates the problem I am having with performing a shadow build and using QMAKE_EXTRA_COMPILERS.</p>
<p dir="auto">This is the layout of my files based from /tmp/test:</p>
<pre><code>├── shadow
│   └── Makefile
└── src
    ├── gen.pro
    ├── main.cpp
    ├── test1.xrt
    ├── test2.xrt
    └── test3.xrt
</code></pre>
<p dir="auto"><a href="http://gen.pro" target="_blank" rel="noopener noreferrer nofollow ugc">gen.pro</a>:</p>
<pre><code>TEMPLATE = app
TARGET = gen
INCLUDEPATH += .
SOURCES += main.cpp

target.path = /tmp/data
INSTALLS += target

#
XRT_FILES = test1.xrt test2.xrt test3.xrt
gen_headers.input = XRT_FILES
gen_headers.output = ${QMAKE_FILE_BASE}.h
gen_headers.commands = $(COPY) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
gen_headers.variable_out = MY_HEADERS.files
gen_headers.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += gen_headers

MY_HEADERS.path = $$target.path
MY_HEADERS.CONFIG += no_check_exist
INSTALLS += MY_HEADERS
</code></pre>
<p dir="auto">when I execute "qmake ../src" from the shadow directory the generated Makefile has these install commands for MY_HEADERS:</p>
<pre><code>install_MY_HEADERS: first FORCE
        @test -d $(INSTALL_ROOT)/tmp/data || mkdir -p $(INSTALL_ROOT)/tmp/data
        -$(QINSTALL) /tmp/test/src/test1.h $(INSTALL_ROOT)/tmp/data/test1.h
        -$(QINSTALL) /tmp/test/src/test2.h $(INSTALL_ROOT)/tmp/data/test2.h
        -$(QINSTALL) /tmp/test/src/test3.h $(INSTALL_ROOT)/tmp/data/test3.h
</code></pre>
<p dir="auto">The '/tmp/test/src' path seems to be based on the .pro file and not based on my shadow directory location. How do I force that path to be in '/tmp/test/shadow' instead?  Is this a bug in qmake?</p>
<p dir="auto">I tried 'gen_headers.output = $$OUT_PWD/${QMAKE_FILE_BASE}.h' but that did not change anything.</p>
]]></description><link>https://forum.qt.io/topic/136821/qmake-shadow-build-problem-using-qmake_extra_compilers</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 21:21:52 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/136821.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 May 2022 16:49:58 GMT</pubDate><ttl>60</ttl></channel></rss>