summaryrefslogtreecommitdiff
path: root/src/cmake
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-28 11:34:43 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-28 11:34:43 +0000
commit0b881d5dd5237e545efd6ada1010c51f1f50badd (patch)
tree60e0ae5c0f6f8835e86a85df7bb3b78f6725c89e /src/cmake
parente5e9fd63017729934a3027ef90fcdd52ae476dc4 (diff)
GudhUI compilation issue and generate version for GudhUI issue fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@583 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: beea454e849615bb9d087ccdcb0110a146a42564
Diffstat (limited to 'src/cmake')
-rw-r--r--src/cmake/modules/FindQGLViewer.cmake61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/cmake/modules/FindQGLViewer.cmake b/src/cmake/modules/FindQGLViewer.cmake
new file mode 100644
index 00000000..65723d67
--- /dev/null
+++ b/src/cmake/modules/FindQGLViewer.cmake
@@ -0,0 +1,61 @@
+# - Try to find QGLViewer
+# Once done this will define
+#
+# QGLVIEWER_FOUND - system has QGLViewer
+# QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
+# QGLVIEWER_LIBRARIES - Link these to use QGLViewer
+# QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer
+#
+
+find_path(QGLVIEWER_INCLUDE_DIR
+ NAMES QGLViewer/qglviewer.h
+ PATHS /usr/include
+ /usr/local/include
+ ENV QGLVIEWERROOT
+ )
+
+find_library(QGLVIEWER_LIBRARY_RELEASE
+ NAMES qglviewer-qt4 qglviewer QGLViewer QGLViewer2
+ PATHS /usr/lib
+ /usr/local/lib
+ ENV QGLVIEWERROOT
+ ENV LD_LIBRARY_PATH
+ ENV LIBRARY_PATH
+ PATH_SUFFIXES QGLViewer QGLViewer/release
+ )
+
+find_library(QGLVIEWER_LIBRARY_DEBUG
+ NAMES dqglviewer dQGLViewer dQGLViewer2 QGLViewerd2
+ PATHS /usr/lib
+ /usr/local/lib
+ ENV QGLVIEWERROOT
+ ENV LD_LIBRARY_PATH
+ ENV LIBRARY_PATH
+ PATH_SUFFIXES QGLViewer QGLViewer/debug
+ )
+
+if(QGLVIEWER_LIBRARY_RELEASE)
+ if(QGLVIEWER_LIBRARY_DEBUG)
+ set(QGLVIEWER_LIBRARIES_ optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG})
+ else()
+ set(QGLVIEWER_LIBRARIES_ ${QGLVIEWER_LIBRARY_RELEASE})
+ endif()
+
+ set(QGLVIEWER_LIBRARIES ${QGLVIEWER_LIBRARIES_} CACHE FILEPATH "The QGLViewer library")
+
+endif()
+
+IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+ SET(QGLVIEWER_FOUND TRUE)
+ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+
+IF(QGLVIEWER_FOUND)
+ IF(NOT QGLViewer_FIND_QUIETLY)
+ MESSAGE(STATUS "Found QGLViewer: ${QGLVIEWER_LIBRARIES}")
+ ENDIF(NOT QGLViewer_FIND_QUIETLY)
+ELSE(QGLVIEWER_FOUND)
+ IF(QGLViewer_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find QGLViewer")
+ ENDIF(QGLViewer_FIND_REQUIRED)
+ENDIF(QGLVIEWER_FOUND)
+