Permalink
Browse files

add missing file

  • Loading branch information...
1 parent b677cf3 commit 167ee0d58774a28ebaffae5f1cd0cc9cf2c36d19 @tbonfort tbonfort committed Aug 6, 2013
Showing with 43 additions and 0 deletions.
  1. +43 −0 cmake/FindSDE.cmake
View
@@ -0,0 +1,43 @@
+# Find ESRI SDE
+#
+# If it's found it sets SDE_FOUND to TRUE
+# and following variables are set:
+# SDE_INCLUDE_DIRS
+# SDE_LIBRARIES
+
+
+FIND_PATH(SDE_INCLUDE_DIR sdetype.h
+ PATHS ${SDE_DIR}
+ PATH_SUFFIXES include arcsde/coverages/include
+)
+
+if(SDE_VERSION STREQUAL "91")
+ FIND_LIBRARY(SDE_LIBRARY NAMES sde91 PATHS ${SDE_DIR} PATH_SUFFIXES lib lib64)
+ FIND_LIBRARY(PE_LIBRARY NAMES pe91 PATHS ${SDE_DIR} PATH_SUFFIXES lib lib64)
+ FIND_LIBRARY(SG_LIBRARY NAMES sg91 PATHS ${SDE_DIR} PATH_SUFFIXES lib lib64)
+else(SDE_VERSION STREQUAL "91")
+ FIND_LIBRARY(SDE_LIBRARY NAMES sde PATHS ${SDE_DIR} PATH_SUFFIXES lib lib64)
+ FIND_LIBRARY(PE_LIBRARY NAMES pe PATHS ${SDE_DIR} PATH_SUFFIXES lib lib64)
+ FIND_LIBRARY(SG_LIBRARY NAMES sg PATHS ${SDE_DIR} PATH_SUFFIXES lib lib64)
+endif(SDE_VERSION STREQUAL "91")
+
+FIND_LIBRARY(SDE_DL_LIBRARY NAMES dl)
+FIND_LIBRARY(SDE_SOCKET_LIBRARY NAMES socket)
+FIND_LIBRARY(SDE_PTHREAD_LIBRARY NAMES pthread)
+
+set(SDE_LIBRARIES ${SDE_LIBRARY} ${PE_LIBRARY} ${SG_LIBRARY})
+if(SDE_DL_LIBRARY)
+ set(SDE_LIBRARIES ${SDE_LIBRARIES} dl)
+endif(SDE_DL_LIBRARY)
+if(SDE_SOCKET_LIBRARY)
+ set(SDE_LIBRARIES ${SDE_LIBRARIES} socket)
+endif(SDE_SOCKET_LIBRARY)
+if(SDE_PTHREAD_LIBRARY)
+ set(SDE_LIBRARIES ${SDE_LIBRARIES} pthread)
+endif(SDE_PTHREAD_LIBRARY)
+
+set(SDE_INCLUDE_DIRS ${SDE_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SDE DEFAULT_MSG SDE_LIBRARIES SDE_INCLUDE_DIRS)
+mark_as_advanced(SDE_LIBRARIES SDE_INCLUDE_DIRS)

0 comments on commit 167ee0d

Please sign in to comment.