Does qmake support out of source builds?
I would like to build qwt out of source so that I can have 1 source and build it for 32 bit and 64 bit for Visual Studio 2005 and Visual Studio 2008 similar to what I do will all of my cmake based libraries so that I can easily integrate qwt into my build process and folder structure. Is there an easy way to get out of source builds with QMake? I have looked at the qmake documentation and I have done some google searching but I can't find what I want.
Re: Does qmake support out of source builds?
Just run qmake in the build directory like you do with cmake
Re: Does qmake support out of source builds?
Thanks. I will have to experiment with that. The reason is I am using windows and visual studio. On the first project I tested (qwt) I got a path too long error. Darn windows not supporting long paths..
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makefile.Release
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1095: expanded command line 'echo compiling x:\QMakeBased\Libraries\qwt-5.2.1\s
rc\qwt_abstract_scale_draw.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_color_map.cpp x:\QMakeBased
\Libraries\qwt-5.2.1\src\qwt_clipper.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_double_interval.c
pp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_double_rect.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\q
wt_dyngrid_layout.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_layout_metrics.cpp x:\QMakeBased\Lib
raries\qwt-5.2.1\src\qwt_math.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_magnifier.cpp x:\QMakeBa
sed\Libraries\qwt-5.2.1\src\qwt_paint_buffer.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_panner.cp
p x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_painter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_pi
cker.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_round_scale_draw.cpp x:\QMakeBased\Libraries\qwt-
5.2.1\src\qwt_scale_div.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_scale_draw.cpp x:\QMakeBased\L
ibraries\qwt-5.2.1\src\qwt_scale_map.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_spline.cpp x:\QMa
keBased\Libraries\qwt-5.2.1\src\qwt_text_engine.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_text_l
abel.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_text.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qw
t_event_pattern.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_picker_machine.cpp x:\QMakeBased\Libra
ries\qwt-5.2.1\src\qwt_scale_engine.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_symbol.cpp x:\QMak
eBased\Libraries\qwt-5.2.1\src\qwt_curve_fitter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_data.c
pp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_interval_data.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src
\qwt_legend.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_legend_item.cpp x:\QMakeBased\Libraries\qw
t-5.2.1\src\qwt_plot.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_print.cpp x:\QMakeBased\Libr
aries\qwt-5.2.1\src\qwt_plot_xml.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_axis.cpp x:\QMak
eBased\Libraries\qwt-5.2.1\src\qwt_plot_curve.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_dic
t.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_grid.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\
qwt_plot_item.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_spectrogram.cpp x:\QMakeBased\Libra
ries\qwt-5.2.1\src\qwt_plot_scaleitem.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_marker.cpp
x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_layout.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_
plot_printfilter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_rasteritem.cpp x:\QMakeBased\Lib
raries\qwt-5.2.1\src\qwt_plot_canvas.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_rescaler.cpp
x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_panner.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt
_plot_picker.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_zoomer.cpp x:\QMakeBased\Libraries\q
wt-5.2.1\src\qwt_plot_magnifier.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_raster_data.cpp x:\QMa
keBased\Libraries\qwt-5.2.1\src\qwt_scale_widget.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_abstr
act_slider.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_abstract_scale.cpp x:\QMakeBased\Libraries\
qwt-5.2.1\src\qwt_arrow_button.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_analog_clock.cpp x:\QMa
keBased\Libraries\qwt-5.2.1\src\qwt_compass.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_compass_ro
se.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_counter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\q
wt_dial.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_dial_needle.cpp x:\QMakeBased\Libraries\qwt-5.
2.1\src\qwt_double_range.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_knob.cpp x:\QMakeBased\Librar
ies\qwt-5.2.1\src\qwt_slider.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_thermo.cpp x:\QMakeBased\
Libraries\qwt-5.2.1\src\qwt_wheel.cpp && cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34
189 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQWT_DLL -DQWT_MAKEDLL -DQT_THREAD_
SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I"..\..\..\Libraries\Qt-4.6.2\include\QtC
ore" -I"..\..\..\Libraries\Qt-4.6.2\include\QtGui" -I"..\..\..\Libraries\Qt-4.6.2\include" -I"..\..\
..\Libraries\Qt-4.6.2\include\ActiveQt" -I"moc" -I"x:\QMakeBased\Libraries\qwt-5.2.1\src" -I"." -I".
.\..\..\Libraries\Qt-4.6.2\mkspecs\default" -Foobj\ @C:\Temp\nm8CB3.tmp' too long
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' :
return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
Re: Does qmake support out of source builds?
Did you have proper environment / PATH set ?
Try opening the visual studio command prompt and then trying compiling..
Re: Does qmake support out of source builds?
This was from a proper Visual Studio 2008 32 bit command prompt.
Re: Does qmake support out of source builds?
Okay. I tested and it appears to work if I shorten the path by substituting the long path with a drive letter.
subst k: x:\QMakeBased\Libraries\qwt-5.2.1
then
x:\32Bit\VC.90\Temp\Qwt-5.2.1>qmake -r k:\qwt.pro
then build and install..
Maybe I should bug microsoft for the reason why in 2010 we have a maximum command line length of 8K (or 8000?) in windows 7 64 bit.
But I guess that is a tremendous improvement over the past:
http://msdn.microsoft.com/en-us/libr...st(VS.80).aspx