mirror of https://github.com/CGAL/cgal
72 lines
2.4 KiB
CMake
72 lines
2.4 KiB
CMake
# - Try to find QGLViewer
|
|
# Once done this will define
|
|
#
|
|
# QGLVIEWER_FOUND - system has QGLViewer
|
|
# QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
|
|
# QGLVIEWER_LIBRARY - 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
|
|
)
|
|
|
|
#set( BUILD_SHARED_LIBS ON )
|
|
|
|
FIND_LIBRARY(QGLVIEWER_LIBRARY_RELEASE
|
|
NAMES QGLViewer QGLViewer2
|
|
PATHS /usr/lib
|
|
/usr/local/lib
|
|
ENV QGLVIEWERROOT
|
|
ENV LD_LIBRARY_PATH
|
|
ENV LIBRARY_PATH
|
|
PATH_SUFFIXES QGLViewer/release
|
|
)
|
|
|
|
FIND_LIBRARY(QGLVIEWER_LIBRARY_DEBUG
|
|
NAMES dQGLViewer dQGLViewer2
|
|
PATHS /usr/lib
|
|
/usr/local/lib
|
|
ENV QGLVIEWERROOT
|
|
ENV LD_LIBRARY_PATH
|
|
ENV LIBRARY_PATH
|
|
PATH_SUFFIXES QGLViewer/debug
|
|
)
|
|
|
|
IF (QGLVIEWER_LIBRARY_RELEASE AND NOT QGLVIEWER_LIBRARY_DEBUG)
|
|
SET(QGLVIEWER_LIBRARY_DEBUG ${QGLVIEWER_LIBRARY_RELEASE})
|
|
ENDIF (QGLVIEWER_LIBRARY_RELEASE AND NOT QGLVIEWER_LIBRARY_DEBUG)
|
|
|
|
IF (QGLVIEWER_LIBRARY_DEBUG AND NOT QGLVIEWER_LIBRARY_RELEASE)
|
|
SET(QGLVIEWER_LIBRARY_RELEASE ${QGLVIEWER_LIBRARY_DEBUG})
|
|
ENDIF (QGLVIEWER_LIBRARY_DEBUG AND NOT QGLVIEWER_LIBRARY_RELEASE)
|
|
|
|
IF (QGLVIEWER_LIBRARY_DEBUG AND QGLVIEWER_LIBRARY_RELEASE)
|
|
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
|
SET(QGLVIEWER_LIBRARY optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG})
|
|
ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
|
SET(QGLVIEWER_LIBRARY ${QGLVIEWER_LIBRARY_RELEASE})
|
|
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
|
|
|
SET(QGLVIEWER_LIBRARY ${QGLVIEWER_LIBRARY} CACHE FILEPATH "The QGLViewer library")
|
|
ENDIF(QGLVIEWER_LIBRARY_DEBUG AND QGLVIEWER_LIBRARY_RELEASE)
|
|
|
|
IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARY)
|
|
SET(QGLVIEWER_FOUND TRUE)
|
|
ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARY)
|
|
|
|
IF(QGLVIEWER_FOUND)
|
|
IF(NOT QGLViewer_FIND_QUIETLY)
|
|
MESSAGE(STATUS "Found QGLViewer: ${QGLVIEWER_LIBRARY}")
|
|
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)
|
|
|