From c35fdf73334c13ab56afc573ecfd77c2028332cd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 13 Sep 2011 09:53:34 +0000 Subject: [PATCH] From Jean-Sebastien Guay, "I added a simple setting in OSG's CMakeLists.txt to be able to disable building anything related to Qt. It just skips the FindPackage(...) for Qt3 and Qt4, so since they are not found nothing related to Qt will be generated by CMake. The default is to build the Qt related stuff, so current behavior is unchanged." --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9b260389..8b4b5eac4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -479,7 +479,9 @@ ENDIF() # Include macro utilities here INCLUDE(OsgMacroUtils) -IF(NOT ANDROID) +OPTION(OSG_USE_QT "Enable to use Qt (build Qt-dependent libraries, plugins and examples)" ON) + +IF(OSG_USE_QT AND NOT ANDROID) # To select a specific version of QT define DESIRED_QT_VERSION # via cmake -DDESIRED_QT_VERSION=4 IF (DESIRED_QT_VERSION) @@ -499,7 +501,8 @@ IF(NOT ANDROID) ENDIF() ENDIF() -ENDIF(NOT ANDROID) +ENDIF() + #optional example related dependencies IF (BUILD_OSG_EXAMPLES AND NOT ANDROID)