| 1 |
find_package(Qt5 COMPONENTS Core Xml OpenGL Gui Widgets QUIET) |
| 2 |
if(NOT Qt5_FOUND) |
| 3 |
message("Qt5 not found. Install it and set Qt5_DIR accordingly") |
| 4 |
if (WIN32) |
| 5 |
message(" In Windows, Qt5_DIR should be something like C:/Qt/5.4/msvc2013_64_opengl/lib/cmake/Qt5") |
| 6 |
endif() |
| 7 |
return() |
| 8 |
endif() |
| 9 |
|
| 10 |
find_path(QGLVIEWER_INCLUDE_DIR qglviewer.h |
| 11 |
/usr/include/QGLViewer |
| 12 |
/opt/local/include/QGLViewer |
| 13 |
/usr/local/include/QGLViewer |
| 14 |
/sw/include/QGLViewer |
| 15 |
ENV QGLVIEWERROOT |
| 16 |
) |
| 17 |
|
| 18 |
find_library(QGLVIEWER_LIBRARY_RELEASE |
| 19 |
NAMES qglviewer QGLViewer qglviewer-qt5 QGLViewer-qt5 |
| 20 |
PATHS /usr/lib |
| 21 |
/usr/local/lib |
| 22 |
/opt/local/lib |
| 23 |
/sw/lib |
| 24 |
ENV QGLVIEWERROOT |
| 25 |
ENV LD_LIBRARY_PATH |
| 26 |
ENV LIBRARY_PATH |
| 27 |
PATH_SUFFIXES QGLViewer QGLViewer/release |
| 28 |
) |
| 29 |
find_library(QGLVIEWER_LIBRARY_DEBUG |
| 30 |
NAMES dqglviewer dQGLViewer dqglviewer-qt5 dQGLViewer-qt5 QGLViewerd2 |
| 31 |
PATHS /usr/lib |
| 32 |
/usr/local/lib |
| 33 |
/opt/local/lib |
| 34 |
/sw/lib |
| 35 |
ENV QGLVIEWERROOT |
| 36 |
ENV LD_LIBRARY_PATH |
| 37 |
ENV LIBRARY_PATH |
| 38 |
PATH_SUFFIXES QGLViewer QGLViewer/debug |
| 39 |
) |
| 40 |
|
| 41 |
if(QGLVIEWER_LIBRARY_RELEASE) |
| 42 |
if(QGLVIEWER_LIBRARY_DEBUG) |
| 43 |
set(QGLVIEWER_LIBRARY optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG}) |
| 44 |
else() |
| 45 |
set(QGLVIEWER_LIBRARY ${QGLVIEWER_LIBRARY_RELEASE}) |
| 46 |
endif() |
| 47 |
endif() |
| 48 |
|
| 49 |
include(FindPackageHandleStandardArgs) |
| 50 |
find_package_handle_standard_args(QGLViewer DEFAULT_MSG |
| 51 |
QGLVIEWER_INCLUDE_DIR QGLVIEWER_LIBRARY) |