QtCreator subdirs project
-
30-06-2021 - |
题
I'm going to achieve the following hierarchy in my QtCreator project based on subdirs template:
Project:
- subproject1 - static library
- subproject2 - static library
- subproject3 - unittests executable
The only one executable will be in subproject3, which will link against subproject1 and subproject 2.
However build works fine I've noticed some usability issue. When I run the whole project it tries to find executables in my libraries - and fails. I have to run subproject3 instead of the main one. Is it possible to avoid such situation?
没有正确的解决方案
其他提示
I am using a similar hierarchy for the unit-tests - and the .pro file should have the following lines in it
INCLUDEPATH += ../subproject1/ \
../subproject2/
After adding the folders in the INCLUDEPATH variable, you can add the sources and header that you need using the SOURCES and HEADERS variables. Hope it helps you
不隶属于 StackOverflow