From 58c62971b5f492d241a27b821de7c1f20a899f23 Mon Sep 17 00:00:00 2001 From: James Goppert Date: Sat, 26 Feb 2011 03:49:48 -0500 Subject: [PATCH] Fixed osg cmake error. --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d88952847..5e94d2264 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,8 +121,8 @@ if (UNIX) find_package(Flite) endif(UNIX) find_package(OpenGL REQUIRED) -find_package(OpenSceneGraph 2.9.9) - #COMPONENTS osgGA osgDB osgUtil osgViewer) +set(OpenSceneGraph_FIND_QUIETLY FALSE) +find_package(OpenSceneGraph 2.9.9 COMPONENTS osgGA osgDB osgUtil osgViewer) find_or_build_from_source(MAVLINK thirdParty/mavlink FOUND_GIT_REPO) # build libraries from source if not found on system @@ -196,13 +196,12 @@ else() message(STATUS "\t\tMAVLINK\tNO") endif () -message(STATUS "OSG_FOUND: ${OPENSCENEGRAPH_FOUND}") -if (OPENSCENEGRAPH_FOUND) +if (${OSG_LIBRARY} STREQUAL "OSG_LIBRARY-NOTFOUND") + message(STATUS "\t\tOpenSceneGraph\tNO") +else() message(STATUS "\t\tOpenSceneGraph\tYES") list(APPEND qgroundcontrolIncludes ${OPENSCENEGRAPH_INCLUDE_DIRS}) list(APPEND qgroundcontrolLibs ${OPENSCENEGRAPH_LIBRARIES}) -else() - message(STATUS "\t\tOpenSceneGraph\t\tNO") endif () if (QT4_FOUND) -- 2.22.0