Skip to content

Commit 0fb3f48

Browse files
author
homann
committed
Fixed CMake files for 0.8 built on win32. Does not build wms, and postgres is not tested/does not work.
All qgis files are compiled into qgis_core.dll (raster, legend, composer, gui, core). Resulting binary crashes, but runs in gdb. Beware! Please see build instructions for trunk on win32, the same environment is used here. git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6506 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b617659 commit 0fb3f48

File tree

18 files changed

+450
-456
lines changed

18 files changed

+450
-456
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
120120
IF (WIN32)
121121

122122
SET (QGIS_BIN_DIR ${CMAKE_INSTALL_PREFIX})
123-
SET (QGIS_DATA_DIR ${CMAKE_INSTALL_PREFIX})
124-
SET (QGIS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/plugins)
123+
SET (QGIS_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/qgis)
124+
SET (QGIS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/lib/qgis)
125125

126+
SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-runtime-pseudo-reloc")
127+
SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-runtime-pseudo-reloc")
126128
ELSE (WIN32)
127129

128130
IF (APPLE)

src/core/CMakeLists.txt

Lines changed: 194 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,169 @@
1+
SET(QGIS_GUI_SRCS
2+
../gui/qgisapp.cpp
3+
../gui/qgisiface.cpp
4+
../gui/qgisinterface.cpp
5+
../gui/qgsabout.cpp
6+
../gui/qgsaddattrdialog.cpp
7+
../gui/qgsattributeaction.cpp
8+
../gui/qgsattributeactiondialog.cpp
9+
../gui/qgsattributedialog.cpp
10+
../gui/qgsattributetable.cpp
11+
../gui/qgsattributetabledisplay.cpp
12+
../gui/qgsbookmarks.cpp
13+
../gui/qgsclipboard.cpp
14+
../gui/qgscolorbutton.cpp
15+
../gui/qgscontinuouscolordialog.cpp
16+
../gui/qgscontinuouscolorrenderer.cpp
17+
../gui/qgscoordinatetransform.cpp
18+
../gui/qgscursors.cpp
19+
../gui/qgscustomprojectiondialog.cpp
20+
../gui/qgsdelattrdialog.cpp
21+
../gui/qgsencodingfiledialog.cpp
22+
../gui/qgsfillstylewidget.cpp
23+
../gui/qgsgeomtypedialog.cpp
24+
../gui/qgsgraduatedsymboldialog.cpp
25+
../gui/qgsgraduatedsymbolrenderer.cpp
26+
../gui/qgshelpviewer.cpp
27+
../gui/qgsidentifyresults.cpp
28+
../gui/qgslabel.cpp
29+
../gui/qgslabeldialog.cpp
30+
../gui/qgslayerprojectionselector.cpp
31+
../gui/qgslinestyledialog.cpp
32+
../gui/qgslinestylewidget.cpp
33+
../gui/qgsludialog.cpp
34+
../gui/qgsmapcanvas.cpp
35+
../gui/qgsmapcanvasitem.cpp
36+
../gui/qgsmapcanvasmap.cpp
37+
../gui/qgsmaplayer.cpp
38+
../gui/qgsmaplayerregistry.cpp
39+
../gui/qgsmaplayerset.cpp
40+
../gui/qgsmapoverviewcanvas.cpp
41+
../gui/qgsmaprender.cpp
42+
../gui/qgsmaptoolcapture.cpp
43+
../gui/qgsmaptool.cpp
44+
../gui/qgsmaptoolidentify.cpp
45+
../gui/qgsmaptoolpan.cpp
46+
../gui/qgsmaptoolselect.cpp
47+
../gui/qgsmaptoolvertexedit.cpp
48+
../gui/qgsmaptoolzoom.cpp
49+
../gui/qgsmarkerdialog.cpp
50+
../gui/qgsmeasure.cpp
51+
../gui/qgsmessageviewer.cpp
52+
../gui/qgsnewhttpconnection.cpp
53+
../gui/qgsoptions.cpp
54+
../gui/qgspastetransformations.cpp
55+
../gui/qgspatterndialog.cpp
56+
../gui/qgspgutil.cpp
57+
../gui/qgspluginmanager.cpp
58+
../gui/qgspointstylewidget.cpp
59+
../gui/qgsproject.cpp
60+
../gui/qgsprojectproperties.cpp
61+
../gui/qgsrasterlayerproperties.cpp
62+
../gui/qgsrubberband.cpp
63+
../gui/qgsrunprocess.cpp
64+
../gui/qgssearchquerybuilder.cpp
65+
../gui/qgsserversourceselect.cpp
66+
../gui/qgssinglesymboldialog.cpp
67+
../gui/qgssinglesymbolrenderer.cpp
68+
../gui/qgsspatialrefsys.cpp
69+
../gui/qgsuniquevaluedialog.cpp
70+
../gui/qgsuniquevaluerenderer.cpp
71+
../gui/qgsvectorfilewriter.cpp
72+
../gui/qgsvectorlayer.cpp
73+
../gui/qgsvectorlayerproperties.cpp
74+
../gui/qgsvertexmarker.cpp
75+
../widgets/projectionselector/qgsprojectionselector.cpp
76+
77+
../composer/qgscomposer.cpp
78+
../composer/qgscomposeritem.cpp
79+
../composer/qgscomposerlabel.cpp
80+
../composer/qgscomposermap.cpp
81+
../composer/qgscomposerpicture.cpp
82+
../composer/qgscomposerscalebar.cpp
83+
../composer/qgscomposervectorlegend.cpp
84+
../composer/qgscomposerview.cpp
85+
../composer/qgscomposition.cpp
86+
87+
../legend/qgslegend.cpp
88+
../legend/qgslegendgroup.cpp
89+
../legend/qgslegenditem.cpp
90+
../legend/qgslegendlayer.cpp
91+
../legend/qgslegendlayerfile.cpp
92+
../legend/qgslegendlayerfilegroup.cpp
93+
../legend/qgslegendpropertygroup.cpp
94+
../legend/qgslegendpropertyitem.cpp
95+
../legend/qgslegendsymbologygroup.cpp
96+
../legend/qgslegendsymbologyitem.cpp
97+
../legend/qgslegendvectorsymbologyitem.cpp
98+
99+
../raster/qgsrasterlayer.cpp
100+
101+
)
102+
103+
SET(QGIS_GUI_MOC_HDRS
104+
../gui/qgsnewhttpconnection.h
105+
../gui/qgshelpviewer.h
106+
../gui/qgsattributetable.h
107+
../gui/qgssearchquerybuilder.h
108+
../gui/qgsattributeactiondialog.h
109+
../gui/qgslinestyledialog.h
110+
../gui/qgsabout.h
111+
../gui/qgsmaprender.h
112+
../gui/qgsdelattrdialog.h
113+
../gui/qgsmeasure.h
114+
../gui/qgsgeomtypedialog.h
115+
../gui/qgsgraduatedsymboldialog.h
116+
../gui/qgscustomprojectiondialog.h
117+
../gui/qgspastetransformations.h
118+
../gui/qgscontinuouscolordialog.h
119+
../gui/qgssinglesymboldialog.h
120+
../gui/qgsbookmarks.h
121+
../gui/qgsfillstylewidget.h
122+
../gui/qgsmarkerdialog.h
123+
../gui/qgsidentifyresults.h
124+
../gui/qgsvectorlayerproperties.h
125+
../gui/qgsserversourceselect.h
126+
../gui/qgspluginmanager.h
127+
../gui/qgspatterndialog.h
128+
../gui/qgsaddattrdialog.h
129+
../gui/qgsattributetabledisplay.h
130+
../gui/qgsattributedialog.h
131+
../gui/qgsoptions.h
132+
../gui/qgsludialog.h
133+
../gui/qgslinestylewidget.h
134+
../gui/qgisapp.h
135+
../gui/qgisiface.h
136+
../gui/qgisinterface.h
137+
../gui/qgscoordinatetransform.h
138+
../gui/qgsencodingfiledialog.h
139+
../gui/qgslabeldialog.h
140+
../gui/qgslayerprojectionselector.h
141+
../gui/qgsmapcanvas.h
142+
../gui/qgsmapcanvasitem.h
143+
../gui/qgsmapoverviewcanvas.h
144+
../gui/qgsmaplayer.h
145+
../gui/qgsmaplayerregistry.h
146+
../gui/qgsmaptoolidentify.h
147+
../gui/qgspointstylewidget.h
148+
../widgets/projectionselector/qgsprojectionselector.h
149+
../gui/qgsproject.h
150+
../gui/qgsprojectproperties.h
151+
../gui/qgsrasterlayerproperties.h
152+
../gui/qgsrunprocess.h
153+
../gui/qgsuniquevaluedialog.h
154+
../gui/qgsvectorlayer.h
155+
../legend/qgslegend.h
156+
../composer/qgscomposermap.h
157+
../composer/qgscomposerlabel.h
158+
../composer/qgscomposer.h
159+
../composer/qgscomposerpicture.h
160+
../composer/qgscomposerscalebar.h
161+
../composer/qgscomposervectorlegend.h
162+
../composer/qgscomposerview.h
163+
../composer/qgscomposition.h
164+
165+
../raster/qgsrasterlayer.h
166+
)
1167

2168

3169
#############################################################
@@ -31,6 +197,7 @@ qgsmarkersymbol.cpp
31197
qgsnumericsortlistviewitem.cpp
32198
qgspluginitem.cpp
33199
qgspluginregistry.cpp
200+
../gui/qgspluginmetadata.cpp
34201
qgspoint.cpp
35202
qgspolygonsymbol.cpp
36203
qgsprojectproperty.cpp
@@ -50,7 +217,6 @@ qgssymbol.cpp
50217
qgssymbologyutils.cpp
51218
qgsvectordataprovider.cpp
52219

53-
../raster/qgsrasterlayer.cpp
54220

55221
)
56222

@@ -64,12 +230,31 @@ qgsdataprovider.h
64230
qgshttptransaction.h
65231
qgsrasterdataprovider.h
66232

67-
../raster/qgsrasterlayer.h
68233
)
69234

235+
IF (POSTGRES_FOUND)
236+
SET (QGIS_GUI_SRCS ${QGIS_GUI_SRCS}
237+
../gui/qgsdbsourceselect.cpp
238+
../gui/qgsnewconnection.cpp
239+
../gui/qgspgquerybuilder.cpp
240+
)
241+
SET (QGIS_GUI_MOC_HDRS ${QGIS_GUI_MOC_HDRS}
242+
../gui/qgsdbsourceselect.h
243+
../gui/qgsnewconnection.h
244+
../gui/qgspgquerybuilder.h
245+
)
246+
ENDIF (POSTGRES_FOUND)
247+
248+
QT4_WRAP_CPP(QGIS_GUI_MOC_SRCS ${QGIS_GUI_MOC_HDRS})
70249
QT4_WRAP_CPP(QGIS_CORE_MOC_SRCS ${QGIS_CORE_MOC_HDRS})
71250

72-
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ../raster ../legend ../gui
251+
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
252+
../raster
253+
../legend
254+
../gui
255+
../composer
256+
../plugins
257+
../widgets/projectionselector
73258
${CMAKE_CURRENT_BINARY_DIR}
74259
${CMAKE_CURRENT_BINARY_DIR}/../ui
75260
${QT_QTSVG_INCLUDE_DIR}
@@ -90,10 +275,10 @@ ENDIF (WIN32)
90275
#############################################################
91276
# qgis_core library
92277

93-
ADD_LIBRARY(qgis_core SHARED ${QGIS_CORE_SRCS} ${QGIS_CORE_MOC_SRCS} ${INDEX_SRC})
278+
ADD_LIBRARY(qgis_core SHARED ${QGIS_CORE_SRCS} ${QGIS_CORE_MOC_SRCS} ${QGIS_GUI_SRCS} ${QGIS_GUI_MOC_SRCS} ${INDEX_SRC})
94279

95280
# make sure to create qgssvnversion.h before compiling
96-
ADD_DEPENDENCIES(qgis_core svnversionsounds ui)
281+
ADD_DEPENDENCIES(qgis_core svnversion ui)
97282

98283
# because of htonl
99284
IF (WIN32)
@@ -109,6 +294,10 @@ TARGET_LINK_LIBRARIES(qgis_core
109294
${PLATFORM_LIBRARIES}
110295
)
111296

297+
IF (POSTGRES_FOUND)
298+
TARGET_LINK_LIBRARIES (qgis_core ${POSTGRES_LIBRARY})
299+
ENDIF (POSTGRES_FOUND)
300+
112301
INSTALL(TARGETS qgis_core
113302
RUNTIME DESTINATION ${QGIS_BIN_DIR}
114303
LIBRARY DESTINATION lib)

src/core/qgspluginregistry.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <qlibrary.h>
2525
#include <qapplication.h>
2626
#include "qgsprovidermetadata.h"
27+
#include "qgspluginmetadata.h"
2728
#include "qgspluginregistry.h"
2829

2930
QgsPluginRegistry *QgsPluginRegistry::_instance = 0;

0 commit comments

Comments
 (0)