Skip to content

Commit

Permalink
link all SIP objects with GDAL
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7440 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 17, 2007
1 parent fbfe695 commit fd67cd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions python/CMakeLists.txt
Expand Up @@ -7,9 +7,6 @@ IF (WIN32)
ELSE (NOT MSVC)
SET(QGIS_CORE_LIB ${CMAKE_BINARY_DIR}/src/core/${CMAKE_CFG_INTDIR}/qgis_core.lib)
SET(QGIS_GUI_LIB ${CMAKE_BINARY_DIR}/src/gui/${CMAKE_CFG_INTDIR}/qgis_gui.lib)
GET_FILENAME_COMPONENT(GDAL_LIB_PATH ${GDAL_LIBRARY} PATH)
GET_FILENAME_COMPONENT(GDAL_LIB_NAME ${GDAL_LIBRARY} NAME_WE)
SET(GDAL_LIB_PATHNAME ${GDAL_LIB_PATH}/${GDAL_LIB_NAME})
ENDIF (NOT MSVC)
ELSE (WIN32)
SET(BINDINGS_CORE_LIB ${CMAKE_CURRENT_BINARY_DIR}/core/core.so)
Expand Down Expand Up @@ -38,6 +35,10 @@ ADD_DEPENDENCIES (python qgis_core qgis_gui)
FILE(GLOB CORE_SIP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/core/*.sip")
FILE(GLOB GUI_SIP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/gui/*.sip")

# Extract GDAL library path and name for configure.py.in
STRING(REGEX REPLACE "^(.*)/.*$" "\\1" GDAL_LIB_PATH ${GDAL_LIBRARY})
STRING(REGEX REPLACE "^.*/(lib)?(.*)\\.[^.]+$" "\\2" GDAL_LIB_NAME ${GDAL_LIBRARY})

# Step 1: during configuration
# create file configure.py from configure.py.in
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/configure.py.in
Expand Down
5 changes: 4 additions & 1 deletion python/configure.py.in
Expand Up @@ -9,7 +9,8 @@ build_path = '@CMAKE_BINARY_DIR@'
python_path = src_path + '/python'
gdal_inc_dir = '@GDAL_INCLUDE_DIR@'
geos_inc_dir = '@GEOS_INCLUDE_DIR@'
gdal_library = '@GDAL_LIB_PATHNAME@'
gdal_library = '@GDAL_LIB_NAME@'
gdal_library_path = '@GDAL_LIB_PATH@'

qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
if sys.platform == 'darwin':
Expand Down Expand Up @@ -113,6 +114,8 @@ for mk in [ makefile_core, makefile_gui ]:
if gdal_library!="":
mk.extra_libs.append(gdal_library)
mk.extra_lib_dirs = [build_path+"/src/core"+intdir]
if gdal_library_path!="":
mk.extra_lib_dirs.append(gdal_library_path)
mk.extra_include_dirs = [src_path+"/src/core",
src_path+"/src/core/raster",
src_path+"/src/core/renderer",
Expand Down

0 comments on commit fd67cd9

Please sign in to comment.