Skip to content
Permalink
Browse files

cmake: replace deprecated SUBDIRS with ADD_SUBDIRECTORY

  • Loading branch information
jef-n committed May 27, 2011
1 parent bf4d887 commit b74a515e94838c4c1e17a8c8caa3b2bbfcb7f9f6
@@ -467,23 +467,27 @@ ADD_CUSTOM_TARGET(version ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h)
#############################################################
# process subdirs

SUBDIRS(src doc images resources i18n)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(images)
ADD_SUBDIRECTORY(resources)
ADD_SUBDIRECTORY(i18n)

IF (WITH_BINDINGS)
SUBDIRS (python)
ADD_SUBDIRECTORY(python)
ENDIF (WITH_BINDINGS)

IF (ENABLE_TESTS)
#create a variable to specify where our test data is
#so that unit tests can use TEST_DATA_DIR to locate
#the test data. See CMakeLists in test dirs for more info
SET (TEST_DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/testdata")
SUBDIRS(tests)
ADD_SUBDIRECTORY(tests)
ENDIF (ENABLE_TESTS)

IF (APPLE)
# must be last for install, so install_name_tool can do its work
SUBDIRS (mac)
ADD_SUBDIRECTORY(mac)
ENDIF (APPLE)

# manual page - makes sense only on unix systems
@@ -1,13 +1,17 @@
########################################################
# Files

SET (IMAGE_RCCS images.qrc)

########################################################
# Build

QT4_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})

########################################################
# Continue on to subdirs
SUBDIRS (north_arrows splash icons themes svg)
########################################################
# Files

SET (IMAGE_RCCS images.qrc)

########################################################
# Build

QT4_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})

########################################################
# Continue on to subdirs
ADD_SUBDIRECTORY(north_arrows)
ADD_SUBDIRECTORY(splash)
ADD_SUBDIRECTORY(icons)
ADD_SUBDIRECTORY(themes)
ADD_SUBDIRECTORY(svg)
@@ -1,4 +1,4 @@
SUBDIRS (plugins)
ADD_SUBDIRECTORY(plugins)

FILE (GLOB IMAGES *.png)

@@ -1,4 +1,4 @@
SUBDIRS (coordinate_capture)
ADD_SUBDIRECTORY(coordinate_capture)

FILE (GLOB IMAGES *.png)

@@ -1,7 +1,7 @@
SUBDIRS(plugins)
ADD_SUBDIRECTORY(plugins)

IF (WITH_INTERNAL_SPATIALITE)
SUBDIRS(pyspatialite)
ADD_SUBDIRECTORY(pyspatialite)

INCLUDE_DIRECTORIES(
../src/core/spatialite/headers
@@ -51,7 +51,7 @@ ENDIF(NOT PYQT4_VERSION_NUM LESS 264194)

# core module
FILE(GLOB sip_files_core core/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${sip_files_core})
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core})
ADD_SIP_PYTHON_MODULE(qgis.core core/core.sip qgis_core)

# additional gui includes
@@ -65,7 +65,7 @@ INCLUDE_DIRECTORIES(

# gui module
FILE(GLOB sip_files_gui gui/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_gui})
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_gui})
ADD_SIP_PYTHON_MODULE(qgis.gui gui/gui.sip qgis_core qgis_gui)

# additional analysis includes
@@ -76,7 +76,7 @@ INCLUDE_DIRECTORIES(

# analysis module
FILE(GLOB sip_files_analysis analysis/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis})
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis})
ADD_SIP_PYTHON_MODULE(qgis.analysis analysis/analysis.sip qgis_core qgis_analysis)


@@ -1 +1,5 @@
SUBDIRS(plugin_installer mapserver_export fTools GdalTools osm)
ADD_SUBDIRECTORY(plugin_installer)
ADD_SUBDIRECTORY(mapserver_export)
ADD_SUBDIRECTORY(fTools)
ADD_SUBDIRECTORY(GdalTools)
ADD_SUBDIRECTORY(osm)
@@ -10,5 +10,5 @@ SET(INSTALLER_FILES ${INSTALLER_FILES} ${PYUI_FILES} ${PYRC_FILES})

INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools)

SUBDIRS(tools icons)

ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(icons)
@@ -10,5 +10,6 @@ SET(INSTALLER_FILES ${INSTALLER_FILES} ${PYUI_FILES} ${PYRC_FILES})

INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools)

SUBDIRS(tools icons)
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(icons)

@@ -7,4 +7,5 @@ menu_icons.svg
)
INSTALL(FILES ${VECTOR_GRAPHICS_FILES} logo_small.png DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools/icons)

SUBDIRS(default gis)
ADD_SUBDIRECTORY(default)
ADD_SUBDIRECTORY(gis)
@@ -1,5 +1,4 @@

INSTALL(FILES srs.db qgis.db qgis_help.db symbology-ng-style.xml spatialite.db customization.xml
DESTINATION ${QGIS_DATA_DIR}/resources)

SUBDIRS(context_help)
ADD_SUBDIRECTORY(context_help)
@@ -1,18 +1,27 @@
SUBDIRS(core analysis ui gui app providers plugins helpviewer crssync browser)
ADD_SUBDIRECTORY(core)
ADD_SUBDIRECTORY(analysis)
ADD_SUBDIRECTORY(ui)
ADD_SUBDIRECTORY(gui)
ADD_SUBDIRECTORY(app)
ADD_SUBDIRECTORY(providers)
ADD_SUBDIRECTORY(plugins)
ADD_SUBDIRECTORY(helpviewer)
ADD_SUBDIRECTORY(crssync)
ADD_SUBDIRECTORY(browser)

IF (WITH_BINDINGS)
SUBDIRS(python)
ADD_SUBDIRECTORY(python)
ENDIF (WITH_BINDINGS)

IF (WITH_MAPSERVER)
SUBDIRS(mapserver)
ADD_SUBDIRECTORY(mapserver)
ENDIF (WITH_MAPSERVER)

IF (WITH_ASTYLE)
SUBDIRS(astyle)
ADD_SUBDIRECTORY(astyle)
ENDIF(WITH_ASTYLE)

IF (APPLE)
SUBDIRS(mac)
ADD_SUBDIRECTORY(mac)
ENDIF(APPLE)

@@ -1,2 +1 @@

SUBDIRS(Contents)
ADD_SUBDIRECTORY(Contents)
@@ -21,7 +21,7 @@ ADD_CUSTOM_TARGET(Info.plist ALL
#############################################################
# process subdirs

SUBDIRS(Resources)
ADD_SUBDIRECTORY(Resources)

#############################################################
# install
@@ -1,39 +1,38 @@
SUBDIRS (copyright_label
delimited_text
diagram_overlay
interpolation
north_arrow
scale_bar
oracle_raster
raster_terrain_analysis
coordinate_capture
dxf2shp_converter
evis
point_displacement_renderer
spatialquery
sqlanywhere
roadgraph
)
ADD_SUBDIRECTORY(copyright_label)
ADD_SUBDIRECTORY(delimited_text)
ADD_SUBDIRECTORY(diagram_overlay)
ADD_SUBDIRECTORY(interpolation)
ADD_SUBDIRECTORY(north_arrow)
ADD_SUBDIRECTORY(scale_bar)
ADD_SUBDIRECTORY(oracle_raster)
ADD_SUBDIRECTORY(raster_terrain_analysis)
ADD_SUBDIRECTORY(coordinate_capture)
ADD_SUBDIRECTORY(dxf2shp_converter)
ADD_SUBDIRECTORY(evis)
ADD_SUBDIRECTORY(point_displacement_renderer)
ADD_SUBDIRECTORY(spatialquery)
ADD_SUBDIRECTORY(sqlanywhere)
ADD_SUBDIRECTORY(roadgraph)

IF (WITH_SPATIALITE)
SUBDIRS( offline_editing )
ADD_SUBDIRECTORY(offline_editing)
ENDIF (WITH_SPATIALITE)

IF (POSTGRES_FOUND)
SUBDIRS (spit)
ADD_SUBDIRECTORY(spit)
ENDIF (POSTGRES_FOUND)

IF (EXPAT_FOUND)
SUBDIRS (gps_importer wfs)
ADD_SUBDIRECTORY(gps_importer)
ADD_SUBDIRECTORY(wfs)
ENDIF (EXPAT_FOUND)

IF (GSL_FOUND)
SUBDIRS (georeferencer)
ADD_SUBDIRECTORY(georeferencer)
ENDIF (GSL_FOUND)

IF (GRASS_FOUND)
SUBDIRS (grass)
ADD_SUBDIRECTORY(grass)
ENDIF (GRASS_FOUND)

INSTALL(FILES qgisplugin.h qgsrendererplugin.h DESTINATION ${QGIS_INCLUDE_DIR})

@@ -11,7 +11,10 @@ IF (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${GRASS_MODULES_DIR}")
MESSAGE (SEND_ERROR "Your GRASS version is not supported (${CMAKE_CURRENT_SOURCE_DIR}/${GRASS_MODULES_DIR} is not a Directory).")
ENDIF (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${GRASS_MODULES_DIR}")

SUBDIRS(modules-common ${GRASS_MODULES_DIR} scripts themes)
ADD_SUBDIRECTORY(modules-common)
ADD_SUBDIRECTORY(${GRASS_MODULES_DIR})
ADD_SUBDIRECTORY(scripts)
ADD_SUBDIRECTORY(themes)

ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
@@ -1 +1,3 @@
SUBDIRS(default classic gis)
ADD_SUBDIRECTORY(default)
ADD_SUBDIRECTORY(classic)
ADD_SUBDIRECTORY(gis)
@@ -1,18 +1,24 @@

SUBDIRS (memory ogr wms delimitedtext osm sqlanywhere gdal)
ADD_SUBDIRECTORY(memory)
ADD_SUBDIRECTORY(ogr)
ADD_SUBDIRECTORY(wms)
ADD_SUBDIRECTORY(delimitedtext)
ADD_SUBDIRECTORY(osm)
ADD_SUBDIRECTORY(sqlanywhere)
ADD_SUBDIRECTORY(gdal)

IF (POSTGRES_FOUND)
SUBDIRS (postgres)
ADD_SUBDIRECTORY(postgres)
ENDIF (POSTGRES_FOUND)

IF (SPATIALITE_FOUND OR WITH_INTERNAL_SPATIALITE)
SUBDIRS (spatialite)
ADD_SUBDIRECTORY(spatialite)
ENDIF (SPATIALITE_FOUND OR WITH_INTERNAL_SPATIALITE)

IF (EXPAT_FOUND)
SUBDIRS (gpx wfs)
ADD_SUBDIRECTORY(gpx)
ADD_SUBDIRECTORY(wfs)
ENDIF (EXPAT_FOUND)

IF (GRASS_FOUND)
SUBDIRS (grass)
ADD_SUBDIRECTORY(grass)
ENDIF (GRASS_FOUND)
@@ -1,7 +1,7 @@
########################################################
# Files

SUBDIRS( sqlanyconnection )
ADD_SUBDIRECTORY(sqlanyconnection)

SET (SA_SRCS qgssqlanywhereprovider.cpp)
SET (SA_MOC_HDRS qgssqlanywhereprovider.h)
@@ -1,3 +1,3 @@
IF (ENABLE_TESTS)
SUBDIRS(src)
ENDIF (ENABLE_TESTS)
IF (ENABLE_TESTS)
ADD_SUBDIRECTORY(src)
ENDIF (ENABLE_TESTS)
@@ -1,5 +1,5 @@
IF (ENABLE_TESTS)
SUBDIRS(core)
SUBDIRS(gui)
SUBDIRS(analysis)
ADD_SUBDIRECTORY(core)
ADD_SUBDIRECTORY(gui)
ADD_SUBDIRECTORY(analysis)
ENDIF (ENABLE_TESTS)

0 comments on commit b74a515

Please sign in to comment.
You can’t perform that action at this time.