# Different qmake settings for Arm and Linux builds

**URL:** <https://linux-tips.com/t/different-qmake-settings-for-arm-and-linux-builds/290>\
**Category:** Programming\
**Created:** [October 21, 2015, 11:09am UTC](https://linux-tips.com/t/different-qmake-settings-for-arm-and-linux-builds/290 "2015-10-21T11:09:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg](https://linux-tips.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@Greg](https://linux-tips.com/u/Greg)\
**Post date:** [October 21, 2015, 11:09am UTC](https://linux-tips.com/t/different-qmake-settings-for-arm-and-linux-builds/290/1 "2015-10-21T11:09:49Z")

</div>

Within Qt application, we can use `#ifdef Q_WS_QWS` block to conditionally compile parts of the code for **QtEmbedded**.

But we can’t give specific **LIBS** or **INCLUDEPATH** directives in our `.pro` file.

It is possible to use platform specific directives like below:

```auto
win32 {
    SOURCES += NetworkWin.cpp
}

```

But how can I differentiate builds for Linux desktop and builds for Linux on Arm with cross toolchain?

---

<div class="post-metadata">

**Author:** ![demirten](https://linux-tips.com/user_avatar/linux-tips.com/demirten/32/64_2.png) [@demirten](https://linux-tips.com/u/demirten)\
**Post date:** [October 21, 2015, 5:14pm UTC](https://linux-tips.com/t/different-qmake-settings-for-arm-and-linux-builds/290/2 "2015-10-21T17:14:12Z")

</div>

It is possible to give different rules for each `mkspec` targets specified in **QMAKESPEC** directory like **linux-arm-gnueabi-g++**.

You can use it as:

```auto
linux-arm-gnueabi-g++ {
LIBS += -L$$PWD/../my_platform/lib
LIBS += -lmy_platformlib
} else {
LIBS += -ldesktop
}

```
