Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Under win msvc link to odbc (needed for gdal linking)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7237 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 1, 2007
1 parent 9ce8543 commit 5de4821
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -141,6 +141,10 @@ ADD_DEPENDENCIES(qgis_core svnversion)
# 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_core
Expand Down Expand Up @@ -233,3 +237,7 @@ spatialindex/qgsspatialindex.h

INSTALL(CODE "MESSAGE(\"Installing CORE headers...\")")
INSTALL(FILES ${QGIS_CORE_HDRS} ${QGIS_CORE_MOC_HDRS} DESTINATION ${QGIS_INCLUDE_DIR})
IF (MSVC)
#install the static lib too for 3rd party app writers to use
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/qgis_core.lib DESTINATION ${QGIS_BIN_DIR})
ENDIF (MSVC)
4 changes: 4 additions & 0 deletions src/providers/ogr/CMakeLists.txt
Expand Up @@ -17,6 +17,10 @@ TARGET_LINK_LIBRARIES(ogrprovider
${GEOS_LIBRARY}
qgis_core
)
IF (MSVC)
#needed for linking to gdal which needs odbc
SET(TARGET_LINK_LIBRARIES ${TARGET_LINK_LIBRARIE} odbc32 odbccp32)
ENDIF (MSVC)

INSTALL (TARGETS ogrprovider
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
Expand Down

0 comments on commit 5de4821

Please sign in to comment.