Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, October 2007
question on qmake


Message 1 in thread

hi,
i have a need to enable debug option (-g in QMAKE_CXXFLAGS) only for certain
files that iam interested in. Assuming all these source files have some
common keyword (e.g. mtr in my case), how do i specify that condition to the
pri file..

thanks,
Zaheer

Message 2 in thread

On tirsdag den 30. Oktober 2007, zaheer ahmad wrote:
> hi,
> i have a need to enable debug option (-g in QMAKE_CXXFLAGS) only for
> certain files that iam interested in. Assuming all these source files have
> some common keyword (e.g. mtr in my case), how do i specify that condition
> to the pri file..

AFAIK, you can't do this directly, the config setting is for the entire qmake 
file.

Also, why would you want to do this? When you run in the debugger, you need 
all the other files compiled with debug info so you can get reasonable 
backtraces etc.

If you really want to, you could split the files in question to a separate 
statically linked library and build that with debug.

Bo.

-- 
 [ signature omitted ] 

Message 3 in thread

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=iso-8859-15"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Can someone please look at this code and tell me why qmake will not
generate the correct make install commands?<br>
<br>
I am using Qt 4.3.2<br>
<br>
I have followed the guide. And setup my custom install variables.<br>
However when I run qmake, all the make files install sections are empty.<br>
<br>
It seems that qmake will not generate an install section unless the
files exist in the .files section.. but they cannot exist until they
are built using the make file that is generated.<br>
<br>
Source is attached or:<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.limesg.com/example-hello.tar.bz2";>http://www.limesg.com/example-hello.tar.bz2</a><br>
<br>
<br>
<br>
TEMPLATE = app<br>
TARGET = ../../build/HelloXiamen<br>
DEPENDPATH += .<br>
INCLUDEPATH += .<br>
<br>
include (../../config.pri)<br>
<br>
FORMS += ../forms/hellowidget.ui<br>
<br>
<br>
HEADERS += hellowidget.h<br>
SOURCES += hellowidget.cpp \<br>
           main.cpp<br>
<br>
newcopy.path = /home/tom/myfiles/<br>
newcopy.files = ../../build/*<br>
<br>
INSTALLS += newcopy<br>
<br>
QMAKE_CLEAN += ../../build/* ./Makefile ../Makefile ../../Makefile<br>
</body>
</html>

Attachment:

Attachment: example-hello.tar.bz2
Description: Binary data


Message 4 in thread

I think you can set a flag in the .CONFIG definition of an INSTALLS 
variable:

newcopy.CONFIG = no_check_exist

Of course, doing a second qmake/nmake for install after the build stage 
will always work.

Tom Bruno wrote:
> Can someone please look at this code and tell me why qmake will not 
> generate the correct make install commands?
> 
> I am using Qt 4.3.2
> 
> I have followed the guide. And setup my custom install variables.
> However when I run qmake, all the make files install sections are empty.
> 
> It seems that qmake will not generate an install section unless the 
> files exist in the .files section.. but they cannot exist until they are 
> built using the make file that is generated.
> 
> Source is attached or:
> 
> http://www.limesg.com/example-hello.tar.bz2
> 
> 
> 
> TEMPLATE = app
> TARGET = ../../build/HelloXiamen
> DEPENDPATH += .
> INCLUDEPATH += .
> 
> include (../../config.pri)
> 
> FORMS += ../forms/hellowidget.ui
> 
> 
> HEADERS += hellowidget.h
> SOURCES += hellowidget.cpp \
>            main.cpp
> 
   newcopy.CONFIG = no_check_exist
> newcopy.path = /home/tom/myfiles/
> newcopy.files = ../../build/*
> 
> INSTALLS += newcopy
> 
> QMAKE_CLEAN += ../../build/* ./Makefile ../Makefile ../../Makefile

--
 [ signature omitted ]