[Previous: Support for Generic Projects in Qt Creator]
[Qt Creator Manual]
[Next: Development of Qt for Symbian Based Applications]
External Libraries
The ability to recognize external libraries is not only important for the underlying build system, but also for Qt Creator itself. This ability allows Qt Creator to support code completion and syntax highlighting for external libraries as if they were part of the current project or the Qt library.
The procedure of adding a library to a project depends on the type of project, which influences the build system used. The following sections describe the procedure required for each project type.
QMake Projects (the default)
Open your project file (.pro) from the Projects pane. Then, follow the guidelines in the Declaring other Libraries section of the Qt documentation.
Syntax completion and highlighting work once your project successfully builds and links against the external library.
CMake Projects
In CMake, libraries are usually detected using the FIND_PACKAGE() macro. A couple of them are already being shipped with CMake, they can be found in the Modules directory of your CMake installation. If you provide libraries on your own, you need to provide your own FindFoo.cmake file. Refer to the CMake FAQ for details.
As with qmake projects, syntax completion and highlighting work once you successfully build and link against the external library.
Generic Projects
If you import a project using the Generic Projects function, Qt Creator creates a file called <projectname>.includes in your project root directory. This file contains all project subdirectories for which Qt Creator found relevant headers. Add your include paths here.
Note that in Generic Project mode, Qt Creator does not modify any project settings.
[Previous: Support for Generic Projects in Qt Creator]
[Qt Creator Manual]
[Next: Development of Qt for Symbian Based Applications]
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Trademarks |
Qt Creator 1.3.1 |
|