PDA

View Full Version : qmake set includepath and libs on creating the .pro file



kea_
10th May 2010, 22:37
Hello together,

I like to programm with the Qt4 and use the Code::Blocks editor.
If I add a file (class) to the project I have to modify the .pro file.
I like to do this automatic.



Example:
qmake -project

Result:
################################################## ####################
# Automatically generated by qmake (2.01a) Mo 10. Mai 22:12:59 2010
################################################## ####################

TEMPLATE = app
TARGET =
DEPENDPATH += . MyLibs
INCLUDEPATH += .

# Input
HEADERS += winMainWindow.h MyLibs/csConfig.h MyLibs/csLog.h MyLibs/csMySql.h
SOURCES += main.cpp \
winMainWindow.cpp \
MyLibs/csConfig.cpp \
MyLibs/csLog.cpp \
MyLibs/csMySql.cpp


But for the MySql I have to add this files to:
INCLUDEPATH += C:\MyPrograms\Programming\mysql\include
LIBS += C:\MyPrograms\Programming\mysql\lib\libmysql.a

Is there a possibility to do this width the qmake?

Thanks for your answer.
kea_

ChrisW67
11th May 2010, 07:44
Yes.

In the qmake manual under heading "qmake Project Files"
http://doc.trolltech.com/4.6/qmake-project-files.html

kea_
20th May 2010, 14:42
I have written my own program for that. Because I have to do 2 Steps.
Thanks and greetings
kea_