[solved] Multiple targets in Qt project
I have a Qt project, for a shared library:
TEMPLATE = lib
INSTALLS += TARGET
After compile there is libfoo0.1.0.so and it links against say A, B, C, D. For some reason I need to divide my project into three or more projects. Say foo, bar, baz and they link against A, A and B, C, D. I don't want to divide it into several projects though.
Is this achievable by editing .pro file?
You can use subproject template (but that still requires 3 different .pro files).
[quote author="sierdzio" date="1358411703"]You can use subproject template (but that still requires 3 different .pro files).[/quote]
Yea, already doing that. It's better to have a single project instead.
Now I'm looking for a way to install headers in appropriate locations in /usr/include...
Fount this thread: http://qt-project.org/forums/viewthread/9160
How did he tell .pro to install headers?
Found the from here: http://www.qtcentre.org/threads/29923-How-does-one-get-quot-make-install-quot-target-to-install-quot-ui_-quot-generated-header-files
target.path += $$INSTALL_DIR/lib # get the library file
headers.path = $$INSTALL_DIR/include
headers.extra = "cp $$BUILD_DIR/ui_.h $$INSTALL_DIR/include"
INSTALLS += headers target