Issue
I'm trying to make a qmake .pro file to compile in RaspberryPi (not for cross compile). Can I use conditionals definitions depending on the platform:
linux-g++-64: {
message(We are in Linux 64 bits)
}
macx: {
message(we are in mac osX)
}
win32: ...
But I can't find a way to detect when I'm in a PaspberryPi with raspbian.
I have tried something like linux-arm
, arm-linux
, linux-arm-gnueabi-g++
but not luck.
Someone know the correct way to make this conditional definitions or how to detect if we are compiling in a RaspberryPi architecture?
Solution
This worked for me:
linux {
contains(QMAKE_HOST.arch, arm.*):{
raspberry's bla bla bla
}else{
...
}
}
I hope it works for you.
http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-host
Answered By - Amanda Shiokawa N Freitas Answer Checked By - Candace Johnson (WPSolving Volunteer)