@@ -15,15 +15,6 @@ ENDIF (APPLE)
15
15
MATH (EXPR QGIS_VERSION_INT "${CPACK_PACKAGE_VERSION_MAJOR} *10000+${CPACK_PACKAGE_VERSION_MINOR} *100+${CPACK_PACKAGE_VERSION_PATCH} " )
16
16
MESSAGE (STATUS "Quantum GIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS_VERSION_INT} )" )
17
17
18
- # TODO:
19
- # - install includes for libs
20
- # - nice output when configured
21
- # - rename *.ui files to have the same filename as their implementation
22
- # e.g. instead of blahblahbase.ui use blahblah.ui
23
- # because it's more common in Qt4
24
- # Note on last point above by Tim Sutton - I prefer to have the base suffix
25
- # as it indicates the ui generated class will be a base class for the widget.
26
-
27
18
#############################################################
28
19
# CMake settings
29
20
@@ -37,16 +28,10 @@ SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
37
28
38
29
# in generated makefiles use relative paths so the project dir is moveable
39
30
# Note commented out since it cause problems but it would be nice to resolve these and enable
40
- #
41
- # issue is caused by INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) near the end of this file generating incorrect path
31
+ #
32
+ # issue is caused by INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) near the end of this file generating incorrect path
42
33
#SET (CMAKE_USE_RELATIVE_PATHS ON)
43
34
44
- # it's possible to set PLUGINS_ALSO_BINARIES to TRUE
45
- # then some plugins that can run as standalone apps will be built
46
- # also as standalone apps
47
- SET (PLUGINS_ALSO_BINARIES FALSE )
48
-
49
-
50
35
# try to configure and build GRASS plugin by default
51
36
SET (WITH_GRASS TRUE CACHE BOOL "Determines whether GRASS plugin should be built" )
52
37
IF (WITH_GRASS)
@@ -57,9 +42,6 @@ ENDIF (WITH_GRASS)
57
42
# mapserver by us disabled default because it needs FastCGI (which is optional dependency)
58
43
SET (WITH_MAPSERVER FALSE CACHE BOOL "Determines whether QGIS mapserver should be built" )
59
44
60
- # include doxygen documentation
61
- SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built" )
62
-
63
45
# build our version of astyle
64
46
SET (WITH_ASTYLE FALSE CACHE BOOL "If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)" )
65
47
@@ -256,23 +238,21 @@ IF (WIN32)
256
238
SET (DEFAULT_DATA_SUBDIR .)
257
239
SET (DEFAULT_PLUGIN_SUBDIR plugins)
258
240
SET (DEFAULT_INCLUDE_SUBDIR include )
259
-
241
+
260
242
IF (MSVC )
261
243
SET (DEFAULT_BIN_SUBDIR bin)
262
244
SET (DEFAULT_CGIBIN_SUBDIR bin)
263
245
# put all the build products into a single directory
264
246
# under build (doesnt affect install target) to make for
265
247
# easier debugging.
266
- #tell msvc compiler to use main instead of winmain as the
267
- #application entry point
268
- #SET(QT_USE_QTMAIN TRUE)
248
+
269
249
# Turn on defines for non standard maths stuff
270
250
ADD_DEFINITIONS (-D_USE_MATH_DEFINES)
271
251
272
252
# Turn off deprecation warnings
273
253
ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
274
254
ADD_DEFINITIONS (-D_CRT_NONSTDC_NO_WARNINGS)
275
-
255
+
276
256
IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
277
257
MESSAGE (STATUS "Generating browse files" )
278
258
ADD_DEFINITIONS ( /FR )
@@ -340,35 +320,25 @@ ENDIF (WIN32)
340
320
341
321
#assume we have escaped compiler directives
342
322
#eventually we want to change this to new
343
- #since we don't need to jump through so many
323
+ #since we don't need to jump through so many
344
324
#hoops to escape compiler directives then
345
325
IF (COMMAND cmake_policy)
346
326
cmake_policy (SET CMP0003 NEW)
347
327
cmake_policy (SET CMP0005 OLD)
348
328
ENDIF (COMMAND cmake_policy)
349
329
350
330
IF (WIN32 )
351
- # expect that classes are being imported
352
- # Note: MSVC doesn't like when the macros are quotes
353
- # and MSYS doesn't like them unqouted (bacause of braces)
354
- IF (MSVC )
355
- ADD_DEFINITIONS ("-DCORE_EXPORT=__declspec(dllimport)" )
356
- ADD_DEFINITIONS ("-DGUI_EXPORT=__declspec(dllimport)" )
357
- ADD_DEFINITIONS ("-DPYTHON_EXPORT=__declspec(dllimport)" )
358
- ADD_DEFINITIONS ("-DANALYSIS_EXPORT=__declspec(dllimport)" )
359
- ELSE (MSVC )
360
- ADD_DEFINITIONS ("\" -DCORE_EXPORT=__declspec(dllimport)\" " )
361
- ADD_DEFINITIONS ("\" -DGUI_EXPORT=__declspec(dllimport)\" " )
362
- ADD_DEFINITIONS ("\" -DPYTHON_EXPORT=__declspec(dllimport)\" " )
363
- ADD_DEFINITIONS ("\" -DANALYSIS_EXPORT=__declspec(dllimport)\" " )
364
- ENDIF (MSVC )
331
+ SET (DLLIMPORT "__declspec(dllimport)" )
332
+ SET (DLLEXPORT "__declspec(dllexport)" )
365
333
ELSE (WIN32 )
366
- # other compilers don't use that MSVC construct
367
- ADD_DEFINITIONS (-DCORE_EXPORT=)
368
- ADD_DEFINITIONS (-DGUI_EXPORT=)
369
- ADD_DEFINITIONS (-DPYTHON_EXPORT=)
370
- ADD_DEFINITIONS (-DANALYSIS_EXPORT=)
371
- ENDIF (WIN32 )
334
+ SET (DLLIMPORT "" )
335
+ SET (DLLEXPORT "" )
336
+ ENDIF (WIN32 )
337
+
338
+ ADD_DEFINITIONS ("-DCORE_EXPORT=${DLLIMPORT} " )
339
+ ADD_DEFINITIONS ("-DGUI_EXPORT=${DLLIMPORT} " )
340
+ ADD_DEFINITIONS ("-DPYTHON_EXPORT=${DLLIMPORT} " )
341
+ ADD_DEFINITIONS ("-DANALYSIS_EXPORT=${DLLIMPORT} " )
372
342
373
343
#############################################################
374
344
# user-changeable settings which can be used to customize
@@ -477,23 +447,27 @@ ADD_CUSTOM_TARGET(version ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h)
477
447
#############################################################
478
448
# process subdirs
479
449
480
- SUBDIRS (src doc images resources i18n)
450
+ ADD_SUBDIRECTORY (src)
451
+ ADD_SUBDIRECTORY (doc )
452
+ ADD_SUBDIRECTORY (images)
453
+ ADD_SUBDIRECTORY (resources)
454
+ ADD_SUBDIRECTORY (i18n)
481
455
482
456
IF (WITH_BINDINGS)
483
- SUBDIRS (python)
457
+ ADD_SUBDIRECTORY (python)
484
458
ENDIF (WITH_BINDINGS)
485
459
486
460
IF (ENABLE_TESTS)
487
461
#create a variable to specify where our test data is
488
462
#so that unit tests can use TEST_DATA_DIR to locate
489
463
#the test data. See CMakeLists in test dirs for more info
490
464
SET (TEST_DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR} /tests/testdata" )
491
- SUBDIRS (tests)
465
+ ADD_SUBDIRECTORY (tests)
492
466
ENDIF (ENABLE_TESTS)
493
467
494
468
IF (APPLE )
495
469
# must be last for install, so install_name_tool can do its work
496
- SUBDIRS (mac)
470
+ ADD_SUBDIRECTORY (mac)
497
471
ENDIF (APPLE )
498
472
499
473
# manual page - makes sense only on unix systems
0 commit comments