diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c30f5db..3564c80a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,13 +18,17 @@ IF(ENABLE_CPP0X) ENDIF() ADD_SUBDIRECTORY(library) -ADD_SUBDIRECTORY(examples/OpenGL) + +OPTION(ENABLE_EXAMPLES "Should the examples be built" ON) +IF(ENABLE_EXAMPLES) + ADD_SUBDIRECTORY(examples/OpenGL) +ENDIF(ENABLE_EXAMPLES) ADD_DEPENDENCIES(OpenGLExample PolyVoxCore PolyVoxUtil) INCLUDE(Packaging.cmake) -ENABLE_TESTING() INCLUDE(CTest) - -ADD_SUBDIRECTORY(tests) +IF(BUILD_TESTING) + ADD_SUBDIRECTORY(tests) +ENDIF(BUILD_TESTING)