Skip to content
Permalink
Browse files

more cleanups:

- don't link GSL's CBLAS. We don't use it.
- don't link GEOS and GDAL into python bindings. They don't use them directly.
- link libdl on unix when internal spatialite is used
- update SONAMEs
- fix some warnings and typos



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11250 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Aug 2, 2009
1 parent 944c27d commit 8fdcd8af7141a43bde2184166642c0c83154d283
@@ -107,6 +107,9 @@ ENDIF (NOT BISON_EXECUTABLE)
#############################################################
# search for dependencies

# we don't use cblas
SET(DONT_LINK_CBLAS TRUE)

# required
FIND_PACKAGE(Proj)
FIND_PACKAGE(Expat) # GPS importer plugin
@@ -27,24 +27,30 @@ IF(WIN32)

SET(GSL_MINGW_PREFIX "c:/msys/local" )
SET(GSL_MSVC_PREFIX "$ENV{LIB_DIR}")
FIND_LIBRARY(GSL_LIB gsl PATHS
${GSL_MINGW_PREFIX}/lib
${GSL_MSVC_PREFIX}/lib
)
#MSVC version of the lib is just called 'cblas'
FIND_LIBRARY(GSLCBLAS_LIB gslcblas cblas PATHS
${GSL_MINGW_PREFIX}/lib
${GSL_MSVC_PREFIX}/lib
)

FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_blas.h
${GSL_MINGW_PREFIX}/include
${GSL_MSVC_PREFIX}/include
)

IF (GSL_LIB AND GSLCBLAS_LIB)
SET (GSL_LIBRARIES ${GSL_LIB} ${GSLCBLAS_LIB})
ENDIF (GSL_LIB AND GSLCBLAS_LIB)
FIND_LIBRARY(GSL_LIB gsl PATHS
${GSL_MINGW_PREFIX}/lib
${GSL_MSVC_PREFIX}/lib
)

IF (DONT_LINK_CBLAS)
IF (GSL_LIB)
SET (GSL_LIBRARIES ${GSL_LIB} )
ENDIF (GSL_LIB)
ELSE (DONT_LINK_CBLAS)
FIND_LIBRARY(GSLCBLAS_LIB gslcblas cblas PATHS
${GSL_MINGW_PREFIX}/lib
${GSL_MSVC_PREFIX}/lib
)
IF (GSL_LIB AND GSLCBLAS_LIB)
SET (GSL_LIBRARIES ${GSL_LIB} ${GSLCBLAS_LIB})
ENDIF (GSL_LIB AND GSLCBLAS_LIB)
ENDIF (DONT_LINK_CBLAS)

ELSE(WIN32)
IF(UNIX)
@@ -55,8 +61,14 @@ ELSE(WIN32)
/usr/bin/
)
# MESSAGE("DBG GSL_CONFIG ${GSL_CONFIG}")

IF (GSL_CONFIG)
IF (DONT_LINK_CBLAS)
SET(LIBS_ARG "--libs-without-cblas")
ELSE (DONT_LINK_CBLAS)
SET(LIBS_ARG "--libs")
ENDIF (DONT_LINK_CBLAS)

# set CXXFLAGS to be fed into CXX_FLAGS by the user:
SET(GSL_CXX_FLAGS "`${GSL_CONFIG} --cflags`")

@@ -68,12 +80,12 @@ ELSE(WIN32)

# set link libraries and link flags
EXEC_PROGRAM(${GSL_CONFIG}
ARGS --libs
ARGS ${LIBS_ARG}
OUTPUT_VARIABLE GSL_LIBRARIES)

## extract link dirs for rpath
EXEC_PROGRAM(${GSL_CONFIG}
ARGS --libs
ARGS ${LIBS_ARG}
OUTPUT_VARIABLE GSL_CONFIG_LIBS )

## split off the link dirs (for rpath)
@@ -9,10 +9,6 @@ build_path = '@CMAKE_BINARY_DIR@'
python_path = src_path + '/python'
gdal_inc_dir = '@GDAL_INCLUDE_DIR@'
geos_inc_dir = '@GEOS_INCLUDE_DIR@'
geos_library = '@GEOS_LIB_NAME@'
geos_library_path = '@GEOS_LIB_PATH@'
gdal_library = '@GDAL_LIB_NAME@'
gdal_library_path = '@GDAL_LIB_PATH@'

qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
if sys.platform == 'darwin':
@@ -127,15 +123,7 @@ makefile_gui = sipconfig.ModuleMakefile(
# common settings for both core and gui libs
for mk in [ makefile_core, makefile_gui ]:
mk.extra_libs = ["qgis_core"]
if geos_library!="":
mk.extra_libs.append(geos_library)
if gdal_library!="":
mk.extra_libs.append(gdal_library)
mk.extra_lib_dirs = [build_path+"/src/core"+intdir]
if geos_library_path!="":
mk.extra_lib_dirs.append(geos_library_path)
if gdal_library_path!="":
mk.extra_lib_dirs.append(gdal_library_path)
mk.extra_include_dirs = [src_path+"/src/core", src_path+"/src/core/composer",
src_path+"/src/core/raster",
src_path+"/src/core/renderer",
@@ -248,9 +248,7 @@ PATH_PREFIX(INDEX_SRC spatialindex ${SPINDEX_SRC})

ADD_LIBRARY(qgis_core SHARED ${QGIS_CORE_SRCS} ${QGIS_CORE_MOC_SRCS} ${INDEX_SRC})

SET_TARGET_PROPERTIES(qgis_core PROPERTIES
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
SOVERSION ${COMPLETE_VERSION})
SET_TARGET_PROPERTIES(qgis_core PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})

# make sure to create qgssvnversion.h before compiling
ADD_DEPENDENCIES(qgis_core svnversion)
@@ -282,7 +280,7 @@ IF (WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
ENDIF (WIN32 OR APPLE)
IF (UNIX)
TARGET_LINK_LIBRARIES(qgis_core pthread)
TARGET_LINK_LIBRARIES(qgis_core pthread dl)
ENDIF (UNIX)
ELSE (WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})
@@ -23,7 +23,6 @@
***************************************************************************/
/* $Id$ */

#include <iostream>
#include <vector>

#include <QStringList>
@@ -40,7 +39,7 @@ void QgsAttributeAction::addAction( QString name, QString action,
mActions.push_back( QgsAction( name, action, capture ) );
}

void QgsAttributeAction::doAction( unsigned int index, const std::vector<std::pair<QString, QString> >& values,
void QgsAttributeAction::doAction( unsigned int index, const std::vector< std::pair<QString, QString> > &values,
uint defaultValueIndex )
{
aIter action = retrieveAction( index );
@@ -79,7 +78,7 @@ QgsAttributeAction::aIter QgsAttributeAction::retrieveAction( unsigned int index
return a_iter;
}

QString QgsAttributeAction::expandAction( QString action, const std::vector<std::pair<QString, QString> >& values,
QString QgsAttributeAction::expandAction( QString action, const std::vector< std::pair<QString, QString> > &values,
uint clickedOnValue )
{
// This function currently replaces all %% characters in the action
@@ -88,7 +88,7 @@ class CORE_EXPORT QgsAttributeAction
//! Does the action using the given values. defaultValueIndex is an
// index into values which indicates which value in the values vector
// is to be used if the action has a default placeholder.
void doAction( unsigned int index, const std::vector<std::pair<QString, QString> >& values,
void doAction( unsigned int index, const std::vector< std::pair<QString, QString> > &values,
uint defaultValueIndex = 0 );

//! Returns a const_iterator that points to the QgsAction at the
@@ -114,7 +114,7 @@ class CORE_EXPORT QgsAttributeAction

//! Expands the given action, replacing all %'s with the value as
// given.
static QString expandAction( QString action, const std::vector<std::pair<QString, QString> >& values,
static QString expandAction( QString action, const std::vector< std::pair<QString, QString> > &values,
uint defaultValueIndex );

//! Writes the actions out in XML format
@@ -3688,7 +3688,9 @@ QMap< QString, QVariant > &QgsVectorLayer::valueMap( int idx )

// FIXME: throw an exception!?
if ( fields.contains( idx ) )
{
QgsDebugMsg( QString( "field %1 not found" ).arg( idx ) );
}

if ( !mValueMaps.contains( fields[idx].name() ) )
mValueMaps[ fields[idx].name()] = QMap<QString, QVariant>();
@@ -3702,7 +3704,9 @@ QgsVectorLayer::RangeData &QgsVectorLayer::range( int idx )

// FIXME: throw an exception!?
if ( fields.contains( idx ) )
{
QgsDebugMsg( QString( "field %1 not found" ).arg( idx ) );
}

if ( !mRanges.contains( fields[idx].name() ) )
mRanges[ fields[idx].name()] = RangeData();
@@ -72,9 +72,7 @@ ENDIF (WIN32)

ADD_LIBRARY(qgis_gui SHARED ${QGIS_GUI_SRCS} ${QGIS_GUI_MOC_SRCS})

SET_TARGET_PROPERTIES(qgis_gui PROPERTIES
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
SOVERSION ${COMPLETE_VERSION})
SET_TARGET_PROPERTIES(qgis_gui PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})

# make sure that UI files will be processed first
ADD_DEPENDENCIES(qgis_gui ui)
@@ -21,9 +21,7 @@ INCLUDE_DIRECTORIES (

ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})

SET_TARGET_PROPERTIES(qgisgrass PROPERTIES
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})

IF (WIN32)
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES COMPILE_FLAGS "\"-DGRASS_EXPORT=__declspec(dllexport)\"" )
@@ -2950,7 +2950,7 @@ bool QgsPostgresProvider::Conn::closeCursor( QString cursorName )

if ( --openCursors == 0 )
{
QgsDebugMsg( "Commiting read-only transaction" );
QgsDebugMsg( "Committing read-only transaction" );
PQexecNR( "COMMIT" );
}

@@ -63,7 +63,7 @@
<item row="1" column="0" >
<widget class="QLabel" name="textLabel2" >
<property name="whatsThis" >
<string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if preceeded by a backslash</string>
<string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if prefixed with a backslash</string>
</property>
<property name="text" >
<string>Action</string>
@@ -79,7 +79,7 @@
<string>Enter the action command here</string>
</property>
<property name="whatsThis" >
<string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if preceeded by a backslash</string>
<string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if prefixed with a backslash</string>
</property>
</widget>
</item>
@@ -79,7 +79,7 @@ p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">This is the list of all layers available in the datasource of the active layer. You can select the layers to load. The layers will be loaded when you press "OK".&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">The layer name is format dependant. Consult the OGR documentation or the documentation of your data format to determine the nature of the included information.&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">The layer name is format dependent. Consult the OGR documentation or the documentation of your data format to determine the nature of the included information.&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">&lt;span style=" font-weight:600;">Be advised: &lt;/span>selecting an already opened layer will not generate an error message and the layer will end up loaded twice!&lt;/p>&lt;/body>&lt;/html></string>
</property>

0 comments on commit 8fdcd8a

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