| Home · Reference · User Guide · Internals |
Library projects must contain some extra code to make them usable by other projects. Here is a sample library .pro file.
qtopia_project(lib)
TARGET=mylib
PREFIX=MYLIB
MYLIB_FORMS=foobase.ui
MYLIB_HEADERS=foo.h
MYLIB_PRIVATE_HEADERS=foo_p.h
MYLIB_SOURCES=foo.cpp
resolve_include()
mylib_headers.files=$$MYLIB_HEADERS
mylib_headers.path=/include/qtopia/mylib
mylib_headers.hint=headers
INSTALLS+=mylib_headers
mylib_private_headers.files=$$MYLIB_PRIVATE_HEADERS
mylib_private_headers.path=/include/qtopia/mylib/private
mylib_private_headers.hint=headers
INSTALLS+=mylib_private_headers
idep(LIBS+=-l$$TARGET)
qt_inc($$TARGET)
This project is a library project called mylib. The use of PREFIX, MYLIB_* and resolve_include() is not strictly required but it will help if the library needs to be extended later.
There are some install rules created and qt_inc() is used to setup the headers. The use of idep() ensures that dependant projects will be linked to this library.
See also Overviews, Setting up Headers, resolve_include(), qt_inc(), idep(), qtopia_project(), TARGET, and PREFIX.
| Copyright © 2007 Trolltech | Qtopia Build System Documentation |