Permalink
Browse files

CMAKE: Add SDE support

  • Loading branch information...
1 parent 428bed8 commit 551d5f48b4f5c3cc7c2bd6710fdd853f0baf269a @szekerest szekerest committed Apr 1, 2013
Showing with 41 additions and 1 deletion.
  1. +41 −1 CMakeLists.txt
View
@@ -123,6 +123,8 @@ option(WITH_POINT_Z_M "include Z and M coordinates in point structure (advanced,
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_SDE91 "include ArcSDE version 9.1 support (must specify SDE_INCLUDE_DIR and SDE_LIBRARY_DIR)" OFF)
+option(WITH_SDE92 "include ArcSDE version 9.2 support (must specify SDE_INCLUDE_DIR and SDE_LIBRARY_DIR)" OFF)
option(WITH_EXEMPI "include xmp output metadata support" OFF)
option(WITH_XMLMAPFILE "include native xml mapfile support (requires libxslt/libexslt)" OFF)
@@ -377,6 +379,30 @@ if(WITH_MSSQL2008)
endif(ODBC_FOUND)
endif(WITH_MSSQL2008)
+if(WITH_SDE91)
+ if(SDE_INCLUDE_DIR AND SDE_LIBRARY_DIR)
+ include_directories(${SDE_INCLUDE_DIR})
+ add_library(msplugin_sde91 MODULE mapsde.c mapthread.c)
+ target_link_libraries(msplugin_sde91 ${SDE_LIBRARY_DIR}/pe91.lib ${SDE_LIBRARY_DIR}/sg91.lib ${SDE_LIBRARY_DIR}/sde91.lib ${MAPSERVER_LIBMAPSERVER})
+ set_target_properties(msplugin_sde91 PROPERTIES COMPILE_FLAGS "-DUSE_SDE")
+ set (USE_SDE91 1)
+ else(SDE_INCLUDE_DIR AND SDE_LIBRARY_DIR)
+ MESSAGE( SEND_ERROR "Must specify SDE_INCLUDE_DIR and SDE_LIBRARY_DIR")
+ endif(SDE_INCLUDE_DIR AND SDE_LIBRARY_DIR)
+endif(WITH_SDE91)
+
+if(WITH_SDE92)
+ if(SDE_INCLUDE_DIR AND SDE_LIBRARY_DIR)
+ include_directories(${SDE_INCLUDE_DIR})
+ add_library(msplugin_sde92 MODULE mapsde.c mapthread.c)
+ target_link_libraries(msplugin_sde92 ${SDE_LIBRARY_DIR}/pe.lib ${SDE_LIBRARY_DIR}/sg.lib ${SDE_LIBRARY_DIR}/sde.lib ${MAPSERVER_LIBMAPSERVER})
+ set_target_properties(msplugin_sde92 PROPERTIES COMPILE_FLAGS "-DUSE_SDE")
+ set (USE_SDE92 1)
+ else(SDE_INCLUDE_DIR AND SDE_LIBRARY_DIR)
+ MESSAGE( SEND_ERROR "Must specify SDE_INCLUDE_DIR and SDE_LIBRARY_DIR")
+ endif(SDE_INCLUDE_DIR AND SDE_LIBRARY_DIR)
+endif(WITH_SDE92)
+
if(WITH_FCGI)
find_package(FCGI)
if(FCGI_FOUND)
@@ -716,8 +742,14 @@ 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}")
+ status_optional_component("MSSQL 2008 (Built as plugin)" "${USE_MSSQL2008}" "${ODBC_LIBRARY}")
endif(USE_MSSQL2008)
+if(USE_SDE91)
+ status_optional_component("SDE 91 (Built as plugin)" "${USE_SDE91}" "${SDE_LIBRARY_DIR}")
+endif(USE_SDE91)
+if(USE_SDE92)
+ status_optional_component("SDE 92 (Built as plugin)" "${USE_SDE92}" "${SDE_LIBRARY_DIR}")
+endif(USE_SDE92)
status_optional_component("Exempi XMP" "${USE_EXEMPI}" "${LIBEXEMPI_LIBRARY}")
message(STATUS " * Optional features")
status_optional_feature("WMS SERVER" "${USE_WMS_SVR}")
@@ -757,6 +789,14 @@ if(USE_MSSQL2008)
INSTALL(TARGETS msplugin_mssql2008 DESTINATION lib)
endif(USE_MSSQL2008)
+if(USE_SDE91)
+ INSTALL(TARGETS msplugin_sde91 DESTINATION lib)
+endif(USE_SDE91)
+
+if(USE_SDE92)
+ INSTALL(TARGETS msplugin_sde92 DESTINATION lib)
+endif(USE_SDE92)
+
INSTALL(TARGETS shp2img mapserv mapserver RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
if(BUILD_STATIC)
INSTALL(TARGETS mapserver_static DESTINATION lib)

0 comments on commit 551d5f4

Please sign in to comment.