A standard c++ qmake-based library is developed for Win32, Mac, and Linux. In the qmake project file, the platform-dependent sources are included like this:
You can negate and combine blocks, so in unix but not in mac would be:
unix:!macx { SOURCES += LinuxSystem.cpp HEADERS += LinuxSystem.h }