From 37c7e46d476b44b6bc008d4756ef2cdc39995c70 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 22 Feb 2016 16:48:47 +0100 Subject: [PATCH 1/3] Test for OPENGL_FOUND --- Surface_mesher/demo/Surface_mesher/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index 9a504d4601a..ba8ef7718f0 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -45,7 +45,7 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) find_package(QGLViewer ) find_package(OpenGL ) - if ( QGLVIEWER_FOUND AND Qt5_FOUND) + if ( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) include_directories( ${QGLVIEWER_INCLUDE_DIR} ) @@ -116,9 +116,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${VTK_LIBS}) - else( QGLVIEWER_FOUND AND Qt5_FOUND) + else( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND) message(STATUS "NOTICE: This demo needs libQGLViewer, and will not be compiled.") - endif( QGLVIEWER_FOUND AND Qt5_FOUND) + endif( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND) else(CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) if(RUNNING_CGAL_AUTO_TEST) # Just to avoid a warning from CMake if that variable is set on the command line... From 20013f3685d3239066be840682aa7ed150ca8dd9 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 25 Feb 2016 14:18:52 +0100 Subject: [PATCH 2/3] Add missing find_package + complete "if" test --- Surface_mesher/demo/Surface_mesher/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index ba8ef7718f0..f39a997d2e4 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -44,8 +44,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) find_package(Qt5 QUIET COMPONENTS OpenGL Xml Svg) find_package(QGLViewer ) find_package(OpenGL ) + find_package(GLU ) - if ( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) + if ( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND ) include_directories( ${QGLVIEWER_INCLUDE_DIR} ) @@ -116,9 +117,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${VTK_LIBS}) - else( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND) + else( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND ) message(STATUS "NOTICE: This demo needs libQGLViewer, and will not be compiled.") - endif( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND) + endif( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND ) else(CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) if(RUNNING_CGAL_AUTO_TEST) # Just to avoid a warning from CMake if that variable is set on the command line... From 6483fc1bb06f4302427afe9ec66f5cc96d500501 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 25 Feb 2016 14:44:00 +0100 Subject: [PATCH 3/3] Remove useless find_package --- Surface_mesher/demo/Surface_mesher/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index f39a997d2e4..d2008d55028 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -44,7 +44,6 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) find_package(Qt5 QUIET COMPONENTS OpenGL Xml Svg) find_package(QGLViewer ) find_package(OpenGL ) - find_package(GLU ) if ( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND )