Reputation: 10868
I am developing a widget library for Linux. It contains some .ui
files. .pro
file looks like this:
TEMPLATE = lib
SOURCES += ...
HEADERS += ...
FORMS += ...
TARGET = foo
headers.files = $$HEADERS
unix {
target.path = /usr/lib
headers.path = /usr/include/foo/
}
INSTALLS += target headers
When I’m installing library on system, ui_*.h files are not present in /usr/include/foo/ and this cause compilation error. How do I either remove need to those files or include them in installation target?
Upvotes: 0
Views: 218
Reputation: 4944
The 'best' solution (IMHO) is to not inherit from the UI classes, but use composition instead. If you use The Single Inheritance Approach, you can get by with a forward-declaration of the UI class, thus obviating the need to make its headers publicly visible.
Upvotes: 2