Questions tagged [qmake]

`qmake`, part of the Qt framework, is a tool for generating Makefiles and IDE project files.

qmake, part of the Qt framework, is a multi-platform tool for generating GNU Makefiles, Microsoft Visual Studio project files, and Apple XCode project files from a common .pro project file.

Among other features specific to the Qt framework, qmake automates the process of running moc on source files that contain the Q_OBJECT macro.

qmake manual can be found here for Qt 4.8 and here for Qt 5.

1860 questions
12
votes
6 answers

qmake: How do I copy .dll/.so's to the output directory?

I have a Qt-project that builds a dll/shared-library and another Qt-project that tests the library. Is there any good way to have qmake copy the dll to the output-folder of the test-project?
Rasmus Faber
  • 48,631
  • 24
  • 141
  • 189
12
votes
1 answer

Does a Qt 5 programmer have to know about DEPENDPATH qmake variable?

With Qt 4 you are bound to get in trouble if you do not setup the variable correctly.
Sergey Skoblikov
  • 5,811
  • 6
  • 40
  • 49
12
votes
1 answer

SCons or CMake instead of qmake

I need some advice in the following matter: I have a QT project, which is currently set up to work nicely with qmake. However, due to expansions of the requirements and future directions of the project I need to change the build system of it, since…
Ferenc Deak
  • 34,348
  • 17
  • 99
  • 167
12
votes
1 answer

Qt. Automatically adding version for application

In a .pro file, I can set version of application such: VERSION = Is there a way of doing this automatically (e.g. getting the value from Mercurial)?
synacker
  • 1,722
  • 13
  • 32
11
votes
1 answer

How to get a Makefile from qmake

Given an x.pro file, how can I produce a makefile? Running qmake x.pro produces an x.pbproj directory without a Makefile. Thanks Edit: Adding info. about the pro file and platform. I am running this on Mac OS X (10.6). The same pro file used to…
user990246
11
votes
8 answers

Finding compiler vendor / version using qmake

Is there any way to get the version and vendor of the compiler used by the user through qmake? What I need is to disable building some targets of my project when g++ 3.x is used and enable them when g++ 4.x is used. Update: Most answers targeted the…
Yorgos Pagles
  • 1,836
  • 3
  • 18
  • 29
11
votes
1 answer

Developing QT applications in Xcode?

My IDE of choice for the Mac (at least for C++ and Objective-C development) is Xcode. I have a 64-bit Intel Mac with OS X Lion installed, and Xcode version 4.2 downloaded from the Mac App Store. My problem is that Qt is apparently not compatible…
Benjamin
  • 541
  • 1
  • 9
  • 17
11
votes
1 answer

How to add external libraries to qt4 application c++

what is the best way to add additional compiled libraries to my qt project ? For example boost or poco libs ? Thanks :)
user660975
11
votes
5 answers

How to refer to the source directory in qmake?

I added version.target = version.h version.commands = bash generate-version.sh QMAKE_EXTRA_TARGETS += version PRE_TARGETDEPS += version.h to the project, but it attempts to run "generate-version.sh" in destination directory: make: Leaving…
Vi.
  • 37,014
  • 18
  • 93
  • 148
11
votes
2 answers

Preprocessor output on Qt Creator

I am compiling C code in Qt Creator and I need to look at the preprocessor output. I added the -E flag to the make, but I don't see the *.i files: mingw32-make.exe -e -w in \qt\qt-build-desktop Please help.
user549099
  • 113
  • 1
  • 4
11
votes
5 answers

Is there a possibility to pass includes via -isystem when using qmake

I use qmake as a makefile builder and want to stick to it. Further I would like to use "gcc -Wall -Werror -Wundef -Wextra" to get robust code. I'm thinking about "-pedantic" but that's further up the road. My main problem at the moment are the tons…
Martin
  • 4,738
  • 4
  • 28
  • 57
11
votes
1 answer

How to use shadow build with relative subdirs?

I'm trying to use a SUBDIR qmake-project with relative subdirectories: TEMPLATE = subdirs SUBDIRS = app ../lib1 When QT creator build this project using "shadow build", which means in an other directory, it puts the output of the file this…
Thibaut D.
  • 2,521
  • 5
  • 22
  • 33
11
votes
4 answers

Setting RPATH order in QMake

I have a Linux Qt program. I'd like it to preferentially use the (dynamic) Qt libraries in the executable's directory if they exist, otherwise use the system's Qt libs. RPATH to the rescue. I add this line to the qmake's .pro file: QMAKE_LFLAGS …
Mike Blackwell
  • 487
  • 1
  • 6
  • 12
11
votes
3 answers

How to get qmake to generate "project dependencies" in a Visual Studio .sln project

I have a qmake build of a few libraries and an app which depends on them. Using the subdirs template I'm able to get qmake to output a .sln file which works almost to my liking in VC2008. Though I've specified the dependencies between the targets…
Michael Daum
  • 820
  • 6
  • 12
11
votes
2 answers

Disable -Wall compiler warnings in a Qt project?

I am compiling a 3rd party library and don't care to fix the warnings present in the library, but I don't want them polluting the Issues pane in Qt Creator. I've tried following the advice here, but there is no compiler flag to disable -Wall after…
Cory Klein
  • 51,188
  • 43
  • 183
  • 243