次のような構造の共有ライブラリ プロジェクトがあります。
library.pro:
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += libs plugins test_programs
...
QT += concurrent
...
# Those files contains pure interfaces (C++ abstract classes)
# with no implementation, and some helper classes with inline implementation.
# So there is no reason to create yet another subproject for them
HEADERS += iface/IInterface1.h \
iface/IInterface2.h \ # IInterface2 needs QtConcurrent
...
IInterface2.h:
...
#include <QtConcurrent> // ERROR HERE: file not found, i.e. qmake ignores
// "QT += concurrent" statement in library.pro
class MyHelperExc : public QtConcurrent::Exception
{ ... }
class IInterface2: public virtual IBaseInterface
{ ... }
だから、私の問題は次のとおりです。qmakeはSUBDIRS
親プロジェクトの変数操作を無視します。しかし、サブプロジェクトでは問題なく動作します。私は何を間違っていますか?