Platform specific subdirs
-
Hello,
I have a Qt project that uses qmake and SUBDIRS template.
Application subproject and many library subprojects. Application needs to compile and run on both linux and windows.
Problem is that one of the library subprojects doesn't compile on windows.
How my root project .pro file looks like:TEMPLATE = subdirs SUBDIRS += \ gui_application \ calc \ swuinfo
I have tried using platform specific identifiers:
TEMPLATE = subdirs unix: SUBDIRS += \ gui_application \ calc \ swuinfo win32: SUBDIRS += \ gui_application \ calc
But that didn't work.
Is there a way to have platform specific subdirs/components?
-
Hello,
I have a Qt project that uses qmake and SUBDIRS template.
Application subproject and many library subprojects. Application needs to compile and run on both linux and windows.
Problem is that one of the library subprojects doesn't compile on windows.
How my root project .pro file looks like:TEMPLATE = subdirs SUBDIRS += \ gui_application \ calc \ swuinfo
I have tried using platform specific identifiers:
TEMPLATE = subdirs unix: SUBDIRS += \ gui_application \ calc \ swuinfo win32: SUBDIRS += \ gui_application \ calc
But that didn't work.
Is there a way to have platform specific subdirs/components?
@Eligijus said in Platform specific subdirs:
But that didn't work.
what exactly didn't work?!?
Also i don't know if it's allowed to have a space in
unix: SUBDIRS
. Try to remove the space, maybe this already leads to the desired behavior. -
@Eligijus said in Platform specific subdirs:
But that didn't work.
what exactly didn't work?!?
Also i don't know if it's allowed to have a space in
unix: SUBDIRS
. Try to remove the space, maybe this already leads to the desired behavior.@raven-worx swuinfo is still included in the project and compiling project fails because swuinfo can't be compiled on windows. space removing didn't work.
-
I had some configuration like this. It was working fine. Just any miss in your configuration. Only Test_3 and Test_4 were built on mac.
TEMPLATE = subdirs
macx {
SUBDIRS +=
Test_3
Test_4
}
win32 {
SUBDIRS += Test_2
} -
Hi
Are you sure it works without the {} scope ?
http://doc.qt.io/archives/qt-4.8/qmake-advanced-usage.htmlwin32 { SOURCES += paintwidget_win.cpp }
Oh, as @dheerendra shows :)
-
Hi
Are you sure it works without the {} scope ?
http://doc.qt.io/archives/qt-4.8/qmake-advanced-usage.htmlwin32 { SOURCES += paintwidget_win.cpp }
Oh, as @dheerendra shows :)
@mrjj yeah it works now even with how I showed in example that "didn't work". After successfully compiling empty project I went to do the same on main project and it failed. After removing build dir(running clean for some reason was not enough) and doing qmake-> build it worked. Thanks anyways :) .
-
@mrjj yeah it works now even with how I showed in example that "didn't work". After successfully compiling empty project I went to do the same on main project and it failed. After removing build dir(running clean for some reason was not enough) and doing qmake-> build it worked. Thanks anyways :) .