From f67c33813d2ba5dbf6602a6c1cd73e69a85c4abb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 1 Oct 2008 12:30:43 +0000 Subject: [PATCH] Add QUIET to find_package --- GraphicsView/demo/GraphicsView/CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index b63880b6325..ffde10e7357 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -6,20 +6,20 @@ cmake_minimum_required(VERSION 2.4) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) -find_package(CGAL REQUIRED Qt4) - -find_package(Qt4 REQUIRED) +find_package(CGAL QUIET COMPONENTS Qt4) include(${CGAL_USE_FILE}) + set( QT_USE_QTXML TRUE ) set( QT_USE_QTMAIN TRUE ) set( QT_USE_QTSCRIPT TRUE ) set( QT_USE_QTOPENGL TRUE ) -find_package(Qt4 REQUIRED) +find_package(Qt4 QUIET) include(${QT_USE_FILE}) +if ( CGAL_FOUND AND QT4_FOUND ) add_executable ( min min.cpp ) @@ -27,4 +27,10 @@ add_executable ( min min.cpp ) # Link with Qt libraries target_link_libraries( min ${QT_LIBRARIES} ) # Link with CGAL -target_link_libraries( min ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) \ No newline at end of file +target_link_libraries( min ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) + +else() + + message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") + +endif()