QtCreatorWizard Code
Wizard to create library projects can be easily used by other projects
Status: Beta
Brought to you by:
novesky
File | Date | Author | Commit |
---|---|---|---|
depends | 2012-12-30 |
![]() |
[f5a480] put depended projects into depends. USE qmake -... |
src | 2012-12-30 |
![]() |
[a673bc] include common.pri is not necessary in pro |
test | 2012-12-30 |
![]() |
[a673bc] include common.pri is not necessary in pro |
README | 2012-12-30 |
![]() |
[4edd52] READEME: how to include a depended project |
TODO | 2012-10-29 |
![]() |
[3f7c3a] todo: qglobal.h |
common.pri | 2013-03-06 |
![]() |
[5da970] add some qmake functions from Qt5 c++ |
configure.pri | 2013-03-06 |
![]() |
[3079b6] Add compile test |
console.png | 2012-02-19 |
![]() |
[1c9abd] Hello world |
project.pro | 2013-03-06 |
![]() |
[3079b6] Add compile test |
wizard.xml | 2012-12-31 |
![]() |
[8071af] move README to doc to avoid conflict with proje... |
Wizard to create a library project for QtCreator. The project generated by this wizard is a subdir project, including the library and it's test application. This library can be easily included by other projects. Just include the pri file! Clone into QtCreator/share/qtcreator/templates/wizards/libproj Restart your qtcreator. Then you can start with "File > New File or Project > Libraries > Perfect library soluton". Add an existing depended project: If project XX depends on project(usally a library) is also use this template, then it very easy to use that project. Assume the depended project is foo 1. Put that project into depends/ 2. Edit depends/depends.pro, add foo or foo/src/libfoo.pro to SUBDIRS 3. Add include($$PROJECTROOT/depends/foo/src/libfoo.pri) after the following lines in $$PROJECTROOT/depends/foo/src/libfoo.pro PROJECTROOT = $$PWD/.. #optional. suppose the that library project's root dir is $$PWD/..; if that project use the same common.pri as this, PROJECTROOT can be this project's include(dir_of_XX/libXX.pri) #resolve depends preparePaths($$OUT_PWD/../out) #parameter is the build dir. if not parameter, build dir is Makefile's dir include($$PROJECTROOT/depends/foo/src/libfoo.pri) #Add the depends Building: RECOMMAND: run qmake with parameters like below recommand to avoid some depends problem qmake -r "BUILD_DIR=your_build_dir" YOU MUST use those arguments if you have sub-projects in depends In QtCreator, all generated files except Makefiles are in 'Build directory/out', Makefiles are in 'Build directory', You can change build directory in QtCreator 'Projects/General/Build directory' Directories: if BUILD_DIR is out, Qt version is 4.8.5 out---.moc/4.8.5/moc_*.cpp .obj/subprojects/*.o .rcc/4.8.5/qrc_xxx.cpp .ui/4.8.5/ui_*.h bin/target(.exe), depended dll lib_win32(lib_unix ...)/*.so,*.a,*.lib,*.dll TODO: 1. depends solution, use a seperate dir 2. deployment 3. res wbsecg1@gmail.com 2012-02-19 last updated 2012-12-30