Permalink
Browse files

Add MSSQL2008 plugin, modify Oracle plugin module name

  • Loading branch information...
1 parent 95e0e84 commit 6488ee616dbc9587cf5067875316c5e26046252e @szekerest szekerest committed Apr 1, 2013
Showing with 26 additions and 5 deletions.
  1. +26 −5 CMakeLists.txt
View
@@ -122,6 +122,7 @@ option(WITH_CSHARP "Enable C# mapscript support" OFF)
option(WITH_POINT_Z_M "include Z and M coordinates in point structure (advanced, not recommended)" OFF)
option(WITH_ORACLESPATIAL "include oracle spatial database input support" OFF)
option(WITH_ORACLE_PLUGIN "include oracle spatial database input support as plugin" OFF)
+option(WITH_MSSQL2008 "include mssql 2008 database input support as plugin" OFF)
option(WITH_EXEMPI "include xmp output metadata support" OFF)
option(WITH_XMLMAPFILE "include native xml mapfile support (requires libxslt/libexslt)" OFF)
@@ -357,12 +358,25 @@ if(ORACLE_FOUND AND WITH_ORACLESPATIAL)
endif(ORACLE_FOUND AND WITH_ORACLESPATIAL)
if(ORACLE_FOUND AND WITH_ORACLE_PLUGIN)
- add_library(maporacleplugin MODULE maporaclespatial.c)
- target_link_libraries(maporacleplugin ${ORACLE_LIBRARY} ${MAPSERVER_LIBMAPSERVER})
- set_target_properties(maporacleplugin PROPERTIES COMPILE_FLAGS -DUSE_ORACLE_PLUGIN)
- set (USE_ORACLE_PLUGIN 1)
+ add_library(msplugin_oracle MODULE maporaclespatial.c)
+ target_link_libraries(msplugin_oracle ${ORACLE_LIBRARY} ${MAPSERVER_LIBMAPSERVER})
+ set_target_properties(msplugin_oracle PROPERTIES COMPILE_FLAGS -DUSE_ORACLE_PLUGIN)
+ set (USE_ORACLE_PLUGIN 1)
endif(ORACLE_FOUND AND WITH_ORACLE_PLUGIN)
+if(WITH_MSSQL2008)
+ find_package(ODBC)
+ if(ODBC_FOUND)
+ include_directories(${ODBC_INCLUDE_DIR})
+ add_library(msplugin_mssql2008 MODULE mapmssql2008.c)
+ target_link_libraries(msplugin_mssql2008 ${ODBC_LIBRARY} ${MAPSERVER_LIBMAPSERVER})
+ set_target_properties(msplugin_mssql2008 PROPERTIES COMPILE_FLAGS "-DUSE_MSSQL2008_PLUGIN -DUSE_MSSQL2008")
+ set (USE_MSSQL2008 1)
+ else(ODBC_FOUND)
+ report_optional_not_found(ODBC)
+ endif(ODBC_FOUND)
+endif(WITH_MSSQL2008)
+
if(WITH_FCGI)
find_package(FCGI)
if(FCGI_FOUND)
@@ -701,6 +715,9 @@ if(USE_ORACLESPATIAL OR USE_ORACLE_PLUGIN)
else(USE_ORACLESPATIAL OR USE_ORACLE_PLUGIN)
status_optional_component("Oracle Spatial" "" "${ORACLE_LIBRARY}")
endif(USE_ORACLESPATIAL OR USE_ORACLE_PLUGIN)
+if(USE_MSSQL2008)
+ status_optional_component("MSSQL 2008(Built as plugin)" "${USE_MSSQL2008}" "${ODBC_LIBRARY}")
+endif(USE_MSSQL2008)
status_optional_component("Exempi XMP" "${USE_EXEMPI}" "${LIBEXEMPI_LIBRARY}")
message(STATUS " * Optional features")
status_optional_feature("WMS SERVER" "${USE_WMS_SVR}")
@@ -733,9 +750,13 @@ endif(WIN32)
#INSTALL(FILES mapserver-api.h ${PROJECT_BINARY_DIR}/mapserver-version.h DESTINATION include)
if(USE_ORACLE_PLUGIN)
- INSTALL(TARGETS maporacleplugin DESTINATION lib)
+ INSTALL(TARGETS msplugin_oracle DESTINATION lib)
endif(USE_ORACLE_PLUGIN)
+if(USE_MSSQL2008)
+ INSTALL(TARGETS msplugin_mssql2008 DESTINATION lib)
+endif(USE_MSSQL2008)
+
INSTALL(TARGETS shp2img mapserv mapserver RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
if(BUILD_STATIC)
INSTALL(TARGETS mapserver_static DESTINATION lib)

0 comments on commit 6488ee6

Please sign in to comment.