From c7aef990432242b2dbd8db6192d29e8487f5db9b Mon Sep 17 00:00:00 2001 From: Caspar Reist Date: Thu, 3 Jul 2014 11:37:22 +0200 Subject: [PATCH] Adding option to choose if octovis&dynamicEDT3D are built As suggested in an issue I added the option to the main cmakelists : BUILD_OCTOVIS_SUBPROJECT. If it's ON (default) everything remains the same, if it's turned off the octomap project can be built even if no QGLViewer and/or OpenGL are found on the system. It also can be used when octomap is used as an external project in a cmake-project, the option can be passed in the cmake_args. --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c01d4022..73324432 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,12 @@ PROJECT( octomap-distribution ) ENABLE_TESTING() # enable CTest environment of subprojects +option(BUILD_OCTOVIS_SUBPROJECT "Build targets from subproject octovis" ON) + ADD_SUBDIRECTORY( octomap ) -ADD_SUBDIRECTORY( octovis ) -ADD_SUBDIRECTORY( dynamicEDT3D ) - +if(BUILD_OCTOVIS_SUBPROJECT) + ADD_SUBDIRECTORY( octovis ) + ADD_SUBDIRECTORY( dynamicEDT3D ) +endif()