I'm writting somthing that runs on windows/mac osx/linux.
If got one set of source filles that is dependent on the platform ho do i best include them?
win32 {
#LIBS += ./WinMM.Lib
HEADERS += ./windows/midiIO.h
SOURCES += ./windows/midiIO.cpp
message(Including Windows specifique headers and sources...)
}
unix {
HEADERS += ./linux/midiIO.h
SOURCES += ./linux/midiIO.cpp
message(Including Linux specifique headers and sources...)
}
macx {
HEADERS += ./macosx/midiIO.h
SOURCES += ./macosx/midiIO.cpp
message(Including Mac OS X specifique headers and sources...)
}
win32 {
#LIBS += ./WinMM.Lib
HEADERS += ./windows/midiIO.h
SOURCES += ./windows/midiIO.cpp
message(Including Windows specifique headers and sources...)
}
unix {
HEADERS += ./linux/midiIO.h
SOURCES += ./linux/midiIO.cpp
message(Including Linux specifique headers and sources...)
}
macx {
HEADERS += ./macosx/midiIO.h
SOURCES += ./macosx/midiIO.cpp
message(Including Mac OS X specifique headers and sources...)
}
To copy to clipboard, switch view to plain text mode
If I put it like this in their own sub dir. it complains that it cant find #include "midiIO.h" when compiling so I have to include with the path to the sub dir. #include "windows/midiIO.h" so I have to change the include on every platform....?????
I'm a bit lost....
....any advise???
Bookmarks