Skip to content

Commit 8fdcd8a

Browse files
author
jef
committed
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
1 parent 944c27d commit 8fdcd8a

12 files changed

+46
-46
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ ENDIF (NOT BISON_EXECUTABLE)
107107
#############################################################
108108
# search for dependencies
109109

110+
# we don't use cblas
111+
SET(DONT_LINK_CBLAS TRUE)
112+
110113
# required
111114
FIND_PACKAGE(Proj)
112115
FIND_PACKAGE(Expat) # GPS importer plugin

cmake/FindGSL.cmake

+27-15
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,30 @@ IF(WIN32)
2727

2828
SET(GSL_MINGW_PREFIX "c:/msys/local" )
2929
SET(GSL_MSVC_PREFIX "$ENV{LIB_DIR}")
30-
FIND_LIBRARY(GSL_LIB gsl PATHS
31-
${GSL_MINGW_PREFIX}/lib
32-
${GSL_MSVC_PREFIX}/lib
33-
)
34-
#MSVC version of the lib is just called 'cblas'
35-
FIND_LIBRARY(GSLCBLAS_LIB gslcblas cblas PATHS
36-
${GSL_MINGW_PREFIX}/lib
37-
${GSL_MSVC_PREFIX}/lib
38-
)
3930

4031
FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_blas.h
4132
${GSL_MINGW_PREFIX}/include
4233
${GSL_MSVC_PREFIX}/include
4334
)
4435

45-
IF (GSL_LIB AND GSLCBLAS_LIB)
46-
SET (GSL_LIBRARIES ${GSL_LIB} ${GSLCBLAS_LIB})
47-
ENDIF (GSL_LIB AND GSLCBLAS_LIB)
36+
FIND_LIBRARY(GSL_LIB gsl PATHS
37+
${GSL_MINGW_PREFIX}/lib
38+
${GSL_MSVC_PREFIX}/lib
39+
)
40+
41+
IF (DONT_LINK_CBLAS)
42+
IF (GSL_LIB)
43+
SET (GSL_LIBRARIES ${GSL_LIB} )
44+
ENDIF (GSL_LIB)
45+
ELSE (DONT_LINK_CBLAS)
46+
FIND_LIBRARY(GSLCBLAS_LIB gslcblas cblas PATHS
47+
${GSL_MINGW_PREFIX}/lib
48+
${GSL_MSVC_PREFIX}/lib
49+
)
50+
IF (GSL_LIB AND GSLCBLAS_LIB)
51+
SET (GSL_LIBRARIES ${GSL_LIB} ${GSLCBLAS_LIB})
52+
ENDIF (GSL_LIB AND GSLCBLAS_LIB)
53+
ENDIF (DONT_LINK_CBLAS)
4854

4955
ELSE(WIN32)
5056
IF(UNIX)
@@ -55,8 +61,14 @@ ELSE(WIN32)
5561
/usr/bin/
5662
)
5763
# MESSAGE("DBG GSL_CONFIG ${GSL_CONFIG}")
58-
64+
5965
IF (GSL_CONFIG)
66+
IF (DONT_LINK_CBLAS)
67+
SET(LIBS_ARG "--libs-without-cblas")
68+
ELSE (DONT_LINK_CBLAS)
69+
SET(LIBS_ARG "--libs")
70+
ENDIF (DONT_LINK_CBLAS)
71+
6072
# set CXXFLAGS to be fed into CXX_FLAGS by the user:
6173
SET(GSL_CXX_FLAGS "`${GSL_CONFIG} --cflags`")
6274

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

6981
# set link libraries and link flags
7082
EXEC_PROGRAM(${GSL_CONFIG}
71-
ARGS --libs
83+
ARGS ${LIBS_ARG}
7284
OUTPUT_VARIABLE GSL_LIBRARIES)
7385

7486
## extract link dirs for rpath
7587
EXEC_PROGRAM(${GSL_CONFIG}
76-
ARGS --libs
88+
ARGS ${LIBS_ARG}
7789
OUTPUT_VARIABLE GSL_CONFIG_LIBS )
7890

7991
## split off the link dirs (for rpath)

python/configure.py.in

-12
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ build_path = '@CMAKE_BINARY_DIR@'
99
python_path = src_path + '/python'
1010
gdal_inc_dir = '@GDAL_INCLUDE_DIR@'
1111
geos_inc_dir = '@GEOS_INCLUDE_DIR@'
12-
geos_library = '@GEOS_LIB_NAME@'
13-
geos_library_path = '@GEOS_LIB_PATH@'
14-
gdal_library = '@GDAL_LIB_NAME@'
15-
gdal_library_path = '@GDAL_LIB_PATH@'
1612

1713
qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
1814
if sys.platform == 'darwin':
@@ -127,15 +123,7 @@ makefile_gui = sipconfig.ModuleMakefile(
127123
# common settings for both core and gui libs
128124
for mk in [ makefile_core, makefile_gui ]:
129125
mk.extra_libs = ["qgis_core"]
130-
if geos_library!="":
131-
mk.extra_libs.append(geos_library)
132-
if gdal_library!="":
133-
mk.extra_libs.append(gdal_library)
134126
mk.extra_lib_dirs = [build_path+"/src/core"+intdir]
135-
if geos_library_path!="":
136-
mk.extra_lib_dirs.append(geos_library_path)
137-
if gdal_library_path!="":
138-
mk.extra_lib_dirs.append(gdal_library_path)
139127
mk.extra_include_dirs = [src_path+"/src/core", src_path+"/src/core/composer",
140128
src_path+"/src/core/raster",
141129
src_path+"/src/core/renderer",

src/core/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ PATH_PREFIX(INDEX_SRC spatialindex ${SPINDEX_SRC})
248248

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

251-
SET_TARGET_PROPERTIES(qgis_core PROPERTIES
252-
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
253-
SOVERSION ${COMPLETE_VERSION})
251+
SET_TARGET_PROPERTIES(qgis_core PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
254252

255253
# make sure to create qgssvnversion.h before compiling
256254
ADD_DEPENDENCIES(qgis_core svnversion)
@@ -282,7 +280,7 @@ IF (WITH_INTERNAL_SPATIALITE)
282280
TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
283281
ENDIF (WIN32 OR APPLE)
284282
IF (UNIX)
285-
TARGET_LINK_LIBRARIES(qgis_core pthread)
283+
TARGET_LINK_LIBRARIES(qgis_core pthread dl)
286284
ENDIF (UNIX)
287285
ELSE (WITH_INTERNAL_SPATIALITE)
288286
TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})

src/core/qgsattributeaction.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
***************************************************************************/
2424
/* $Id$ */
2525

26-
#include <iostream>
2726
#include <vector>
2827

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

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

82-
QString QgsAttributeAction::expandAction( QString action, const std::vector<std::pair<QString, QString> >& values,
81+
QString QgsAttributeAction::expandAction( QString action, const std::vector< std::pair<QString, QString> > &values,
8382
uint clickedOnValue )
8483
{
8584
// This function currently replaces all %% characters in the action

src/core/qgsattributeaction.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class CORE_EXPORT QgsAttributeAction
8888
//! Does the action using the given values. defaultValueIndex is an
8989
// index into values which indicates which value in the values vector
9090
// is to be used if the action has a default placeholder.
91-
void doAction( unsigned int index, const std::vector<std::pair<QString, QString> >& values,
91+
void doAction( unsigned int index, const std::vector< std::pair<QString, QString> > &values,
9292
uint defaultValueIndex = 0 );
9393

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

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

120120
//! Writes the actions out in XML format

src/core/qgsvectorlayer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -3688,7 +3688,9 @@ QMap< QString, QVariant > &QgsVectorLayer::valueMap( int idx )
36883688

36893689
// FIXME: throw an exception!?
36903690
if ( fields.contains( idx ) )
3691+
{
36913692
QgsDebugMsg( QString( "field %1 not found" ).arg( idx ) );
3693+
}
36923694

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

37033705
// FIXME: throw an exception!?
37043706
if ( fields.contains( idx ) )
3707+
{
37053708
QgsDebugMsg( QString( "field %1 not found" ).arg( idx ) );
3709+
}
37063710

37073711
if ( !mRanges.contains( fields[idx].name() ) )
37083712
mRanges[ fields[idx].name()] = RangeData();

src/gui/CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ ENDIF (WIN32)
7272

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

75-
SET_TARGET_PROPERTIES(qgis_gui PROPERTIES
76-
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
77-
SOVERSION ${COMPLETE_VERSION})
75+
SET_TARGET_PROPERTIES(qgis_gui PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
7876

7977
# make sure that UI files will be processed first
8078
ADD_DEPENDENCIES(qgis_gui ui)

src/providers/grass/CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ INCLUDE_DIRECTORIES (
2121

2222
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})
2323

24-
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES
25-
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
26-
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
24+
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
2725

2826
IF (WIN32)
2927
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES COMPILE_FLAGS "\"-DGRASS_EXPORT=__declspec(dllexport)\"" )

src/providers/postgres/qgspostgresprovider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2950,7 +2950,7 @@ bool QgsPostgresProvider::Conn::closeCursor( QString cursorName )
29502950

29512951
if ( --openCursors == 0 )
29522952
{
2953-
QgsDebugMsg( "Commiting read-only transaction" );
2953+
QgsDebugMsg( "Committing read-only transaction" );
29542954
PQexecNR( "COMMIT" );
29552955
}
29562956

src/ui/qgsattributeactiondialogbase.ui

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<item row="1" column="0" >
6464
<widget class="QLabel" name="textLabel2" >
6565
<property name="whatsThis" >
66-
<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>
66+
<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>
6767
</property>
6868
<property name="text" >
6969
<string>Action</string>
@@ -79,7 +79,7 @@
7979
<string>Enter the action command here</string>
8080
</property>
8181
<property name="whatsThis" >
82-
<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>
82+
<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>
8383
</property>
8484
</widget>
8585
</item>

src/ui/qgsogrsublayersdialogbase.ui

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ p, li { white-space: pre-wrap; }
7979
&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
8080
&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>
8181
&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>
82-
&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>
82+
&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>
8383
&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>
8484
&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>
8585
</property>

0 commit comments

Comments
 (0)