Skip to content
Permalink
Browse files

remove unnecessary linkages

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12273 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 28, 2009
1 parent 12a1bbf commit 7930ada5553b657f45eaa9eee5d0eb62f1f245ea
@@ -5,36 +5,33 @@ MACRO (CHECK_GRASS G_PREFIX)

FIND_PATH (GRASS_INCLUDE_DIR grass/version.h ${G_PREFIX}/include)

SET (GRASS_LIBRARIES_FOUND TRUE)
SET (GRASS_LIB_NAMES gis vect dig2 dbmiclient dbmibase shape dgl rtree datetime linkm form gproj)

SET (GRASS_LIBRARIES "")

FOREACH (LIB ${GRASS_LIB_NAMES})
MARK_AS_ADVANCED ( GRASS_LIBRARY_${LIB} )

SET(LIB_PATH NOTFOUND)
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)

IF (LIB_PATH)
IF (NOT GRASS_LIBRARIES STREQUAL NOTFOUND)
SET (GRASS_LIBRARIES ${GRASS_LIBRARIES} ${LIB_PATH})
ENDIF (NOT GRASS_LIBRARIES STREQUAL NOTFOUND)
SET (GRASS_LIBRARY_${LIB} ${LIB_PATH})
ELSE (LIB_PATH)
SET (GRASS_LIBRARIES NOTFOUND)
SET (GRASS_LIBRARY_${LIB} NOTFOUND)
SET (GRASS_LIBRARIES_FOUND FALSE)
ENDIF (LIB_PATH)

ENDFOREACH (LIB)

# LIB_PATH is only temporary variable, so hide it (is it possible to delete a variable?)
MARK_AS_ADVANCED(LIB_PATH)

IF (GRASS_INCLUDE_DIR AND GRASS_LIBRARIES)
IF (GRASS_INCLUDE_DIR AND GRASS_LIBRARIES_FOUND)
SET (GRASS_FOUND TRUE)
SET (GRASS_PREFIX ${G_PREFIX})
ENDIF (GRASS_INCLUDE_DIR AND GRASS_LIBRARIES)
ENDIF (GRASS_INCLUDE_DIR AND GRASS_LIBRARIES_FOUND)

MARK_AS_ADVANCED (
GRASS_INCLUDE_DIR
GRASS_LIBRARIES
)
MARK_AS_ADVANCED ( GRASS_INCLUDE_DIR )

ENDMACRO (CHECK_GRASS)

@@ -80,22 +77,6 @@ IF (GRASS_FOUND)
MESSAGE(STATUS "Found GRASS: ${GRASS_PREFIX} (${GRASS_VERSION})")
ENDIF (NOT GRASS_FIND_QUIETLY)

# openpty is currently needed for GRASS shell
INCLUDE(CheckFunctionExists)
IF (APPLE)
SET (CMAKE_REQUIRED_INCLUDES util.h)
ELSE (APPLE)
SET (CMAKE_REQUIRED_INCLUDES pty.h)
SET (CMAKE_REQUIRED_LIBRARIES util)
ENDIF (APPLE)
CHECK_FUNCTION_EXISTS(openpty HAVE_OPENPTY)

# add 'util' library to the dependencies
IF (HAVE_OPENPTY AND NOT APPLE)
FIND_LIBRARY(OPENPTY_LIBRARY NAMES util PATHS /usr/local/lib /usr/lib c:/msys/local/lib)
SET (GRASS_LIBRARIES ${GRASS_LIBRARIES} ${OPENPTY_LIBRARY})
ENDIF (HAVE_OPENPTY AND NOT APPLE)

ELSE (GRASS_FOUND)

IF (WITH_GRASS)
@@ -37,9 +37,9 @@ else:
if not os.path.isdir("./core"):
os.mkdir("./core")
if not os.path.isdir("./gui"):
os.mkdir("./gui")
os.mkdir("./gui")
if not os.path.isdir("./analysis"):
os.mkdir("./analysis")
os.mkdir("./analysis")

##########################################################################
# SIP -> *.CPP + *.H
@@ -69,24 +69,8 @@ ADD_DEPENDENCIES(qgis_analysis qgis_core)

SET_TARGET_PROPERTIES(qgis_analysis PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})

# because of htonl
IF (WIN32)
SET(PLATFORM_LIBRARIES wsock32)
IF (MSVC)
#needed for linking to gdal which needs odbc
SET(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} odbc32 odbccp32)
ENDIF (MSVC)
ENDIF (WIN32)

TARGET_LINK_LIBRARIES(qgis_analysis
qgis_core
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTMAIN_LIBRARY}
${PROJ_LIBRARY}
${GEOS_LIBRARY}
${GDAL_LIBRARY}
${PLATFORM_LIBRARIES}
)

IF (APPLE)
@@ -298,18 +298,13 @@ ELSE (WIN32)
ENDIF (WIN32)

TARGET_LINK_LIBRARIES(qgis
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTSQL_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
#should only be needed for win
${QT_QTMAIN_LIBRARY}
qgis_core
qgis_gui
)
)

IF(NOT WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis ${SQLITE_LIBRARY})
@@ -279,24 +279,24 @@ ADD_DEPENDENCIES(qgis_core svnversion)

# because of htonl
IF (WIN32)
SET(PLATFORM_LIBRARIES wsock32)
TARGET_LINK_LIBRARIES(qgis_core wsock32)
IF (MSVC)
#needed for linking to gdal which needs odbc
SET(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} odbc32 odbccp32)
# needed for linking to gdal which needs odbc
# TARGET_LINK_LIBRARIES(qgis_core odbc32 odbccp32)
ENDIF (MSVC)
ENDIF (WIN32)

TARGET_LINK_LIBRARIES(qgis_core
${QT_QTMAIN_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTMAIN_LIBRARY}
${QT_QTSVG_LIBRARY}

${PROJ_LIBRARY}
${GEOS_LIBRARY}
${GDAL_LIBRARY}
${PLATFORM_LIBRARIES}
)

IF (WITH_INTERNAL_SPATIALITE)
@@ -323,82 +323,82 @@ INSTALL(TARGETS qgis_core
# Added by Tim to install headers

SET(QGIS_CORE_HDRS
qgis.h
qgsapplication.h
qgsattributeaction.h
qgscentralpointpositionmanager.h
qgsclipper.h
qgscontexthelp.h
qgscoordinatetransform.h
qgsdatasourceuri.h
qgsdistancearea.h
qgscsexception.h
qgsexception.h
qgsfeature.h
qgsfield.h
qgsgeometry.h
qgshttptransaction.h
qgslabel.h
qgslabelattributes.h
qgslogger.h
qgsmaplayer.h
qgsmaplayerregistry.h
qgsmaprenderer.h
qgsmaptopixel.h
qgsmessageoutput.h
qgsoverlayobjectpositionmanager.h
qgspalobjectpositionmanager.h
qgspoint.h
qgsproject.h
qgsprojectfiletransform.h
qgsprojectproperty.h
qgsprojectversion.h
qgsprovidercountcalcevent.h
qgsproviderextentcalcevent.h
qgsprovidermetadata.h
qgsproviderregistry.h
qgsrasterdataprovider.h
qgsrectangle.h
qgsrendercontext.h
qgsrunprocess.h
qgsscalecalculator.h
qgssearchstring.h
qgssearchtreenode.h
qgssnapper.h
qgscoordinatereferencesystem.h
qgsvectordataprovider.h
qgsvectorfilewriter.h
qgsvectorlayer.h
qgsvectoroverlay.h
qgstolerance.h

raster/qgscliptominmaxenhancement.h
raster/qgscolorrampshader.h
raster/qgscolorrampshader.h
raster/qgscontrastenhancement.h
raster/qgscontrastenhancementfunction.h
raster/qgsfreakoutshader.h
raster/qgslinearminmaxenhancement.h
raster/qgslinearminmaxenhancementwithclip.h
raster/qgspseudocolorshader.h
raster/qgsrasterbandstats.h
raster/qgsrasterlayer.h
raster/qgsrastertransparency.h
raster/qgsrastershader.h
raster/qgsrastershaderfunction.h
raster/qgsrasterviewport.h

renderer/qgscontinuouscolorrenderer.h
renderer/qgsgraduatedsymbolrenderer.h
renderer/qgsrenderer.h
renderer/qgssinglesymbolrenderer.h
renderer/qgsuniquevaluerenderer.h
qgis.h
qgsapplication.h
qgsattributeaction.h
qgscentralpointpositionmanager.h
qgsclipper.h
qgscontexthelp.h
qgscoordinatetransform.h
qgsdatasourceuri.h
qgsdistancearea.h
qgscsexception.h
qgsexception.h
qgsfeature.h
qgsfield.h
qgsgeometry.h
qgshttptransaction.h
qgslabel.h
qgslabelattributes.h
qgslogger.h
qgsmaplayer.h
qgsmaplayerregistry.h
qgsmaprenderer.h
qgsmaptopixel.h
qgsmessageoutput.h
qgsoverlayobjectpositionmanager.h
qgspalobjectpositionmanager.h
qgspoint.h
qgsproject.h
qgsprojectfiletransform.h
qgsprojectproperty.h
qgsprojectversion.h
qgsprovidercountcalcevent.h
qgsproviderextentcalcevent.h
qgsprovidermetadata.h
qgsproviderregistry.h
qgsrasterdataprovider.h
qgsrectangle.h
qgsrendercontext.h
qgsrunprocess.h
qgsscalecalculator.h
qgssearchstring.h
qgssearchtreenode.h
qgssnapper.h
qgscoordinatereferencesystem.h
qgsvectordataprovider.h
qgsvectorfilewriter.h
qgsvectorlayer.h
qgsvectoroverlay.h
qgstolerance.h

raster/qgscliptominmaxenhancement.h
raster/qgscolorrampshader.h
raster/qgscolorrampshader.h
raster/qgscontrastenhancement.h
raster/qgscontrastenhancementfunction.h
raster/qgsfreakoutshader.h
raster/qgslinearminmaxenhancement.h
raster/qgslinearminmaxenhancementwithclip.h
raster/qgspseudocolorshader.h
raster/qgsrasterbandstats.h
raster/qgsrasterlayer.h
raster/qgsrastertransparency.h
raster/qgsrastershader.h
raster/qgsrastershaderfunction.h
raster/qgsrasterviewport.h
renderer/qgscontinuouscolorrenderer.h
renderer/qgsgraduatedsymbolrenderer.h
renderer/qgsrenderer.h
renderer/qgssinglesymbolrenderer.h
renderer/qgsuniquevaluerenderer.h

symbology/qgsmarkercatalogue.h
symbology/qgssymbol.h
symbology/qgssymbologyutils.h
symbology/qgsmarkercatalogue.h
symbology/qgssymbol.h
symbology/qgssymbologyutils.h

spatialindex/qgsspatialindex.h
spatialindex/qgsspatialindex.h
)

INSTALL(CODE "MESSAGE(\"Installing CORE headers...\")")
@@ -111,11 +111,6 @@ SET_TARGET_PROPERTIES(qgis_gui PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION
ADD_DEPENDENCIES(qgis_gui ui)

TARGET_LINK_LIBRARIES(qgis_gui
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTMAIN_LIBRARY}
qgis_core
)

@@ -47,7 +47,6 @@ INCLUDE_DIRECTORIES(
)

TARGET_LINK_LIBRARIES(diagramoverlay
${QT_LIBRARIES}
qgis_core
qgis_gui
)
@@ -42,7 +42,6 @@ INCLUDE_DIRECTORIES(
)

TARGET_LINK_LIBRARIES(dxf2shpconverterplugin
${QT_LIBRARIES}
qgis_core
qgis_gui
)
@@ -1,16 +1,3 @@
IF (WIN32)
IF (MSVC)
ADD_DEFINITIONS("-DGUI_EXPORT=__declspec(dllimport)")
ADD_DEFINITIONS("-DCORE_EXPORT=__declspec(dllimport)")
ELSE (MSVC)
ADD_DEFINITIONS("\"-DGUI_EXPORT=__declspec(dllimport)\"")
ADD_DEFINITIONS("\"-DCORE_EXPORT=__declspec(dllimport)\"")
ENDIF (MSVC)
ELSE (WIN32)
ADD_DEFINITIONS(-DGUI_EXPORT=)
ADD_DEFINITIONS(-DCORE_EXPORT=)
ENDIF (WIN32)

########################################################
# Files

@@ -48,14 +35,6 @@ SET (evis_MOC_HDRS

SET (evis_RCCS resources/evis.qrc)

SET (QT_USE_QT3SUPPORT FALSE)
SET (QT_USE_QTGUI TRUE)
SET (QT_USE_QTSQL TRUE)
SET (QT_USE_QTSVG TRUE)
SET (QT_USE_QTXML TRUE)
SET (QT_USE_QTNETWORK TRUE)
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE( ${QT_USE_FILE} )
########################################################
# Build

@@ -83,9 +62,9 @@ INCLUDE_DIRECTORIES(
)

TARGET_LINK_LIBRARIES(evis
${QT_LIBRARIES}
qgis_core
qgis_gui
${QT_QTSQL_LIBRARY}
)


0 comments on commit 7930ada

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