[Interest] Customizing ui/rcc compiler in qmake

Patrick Stinson patrickkidd at gmail.com
Wed Apr 22 16:52:28 CEST 2020


For the record, this seems to have helped:


win32 {
    SIP_PLATFORM = WS_WIN
} macx {
    SIP_PLATFORM = WS_MACX
} linux-g++ {
    SIP_PLATFORM = WS_LINUX
}

# sip compiler
sip_compiler.input = SIP_SOURCE
sip_compiler.output = sipAPI${QMAKE_FILE_BASE}.h sip${QMAKE_FILE_BASE}part0.cpp sip${QMAKE_FILE_BASE}part1.cpp sip${QMAKE_FILE_BASE}part2.cpp sip${QMAKE_FILE_BASE}part3.cpp sip${QMAKE_FILE_BASE}part4.cpp
sip_compiler.CONFIG = no_link target_predeps dep_lines
win32 {
    sip_compiler.commands = sip -t $$SIP_PLATFORM -I Z:\\dev\\vendor\\sysroot-dev-win-32\\Python-3.6.4\\sip\\PyQt5 -c . -j 5 -P -o ${QMAKE_FILE_NAME}
} macx|linux-g++ {
    sip_compiler.commands = sip -t $$SIP_PLATFORM `python3 get_some_sip_flags.py` -c . -j 5 -P -o ${QMAKE_FILE_NAME}
}
sip_compiler.variable_out = GENERATED_FILES
sip_compiler.name = SIP ${QMAKE_FILE_IN}
QMAKE_EXTRA_COMPILERS += sip_compiler

target.files = $$TARGET.so
target.depends = sip$$TARGETpart0.cpp sip$$TARGETpart1.cpp sip$$TARGETpart2.cpp sip$$TARGETpart3.cpp sip$$TARGETpart4.cpp
target.CONFIG = no_check_exist

# pyuic5 compiler
pyuic5.input = FORMS
pyuic5.output = ${QMAKE_FILE_BASE}_form.py
pyuic5.dependency_type = TYPE_UI
pyuic5.CONFIG = no_link target_predeps dep_lines
pyuic5.commands = pyuic5 ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
pyuic5.variable_out = GENERATED_FILES
pyuic5.name = PyUIC5 ${QMAKE_FILE_IN}
QMAKE_EXTRA_COMPILERS += pyuic5

#pyrcc5 compiler
pyrcc5.input = RESOURCES
pyrcc5.output = qrc_${QMAKE_FILE_BASE}.py
pyrcc5.dependency_type = TYPE_RCC
pyrcc5.CONFIG = no_link target_predeps dep_lines
pyrcc5.commands = pyrcc5 ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
QMAKE_EXTRA_COMPILERS += pyrcc5



> On Apr 21, 2020, at 10:50 AM, Patrick Stinson <patrickkidd at gmail.com> wrote:
> 
> Sorry, I meant uic not rcc.
> 
>> On Apr 21, 2020, at 10:14 AM, Patrick Stinson <patrickkidd at gmail.com> wrote:
>> 
>> Is there a way to customize the ui compiler to use a command other than rcc?
>> 
>> For example, I am trying to set up my pyqt5 project using only qmake and want it to use the command pyrcc5 instead of rcc, and with a few custom command line arguments.
>> 
>> Thanks!
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200422/c8cb4d93/attachment.html>


More information about the Interest mailing list