Simplify the BUILD_EXAMPLES logic

This commit is contained in:
Matt Williams 2015-02-28 10:24:32 +00:00
parent 32b07659a8
commit d9dae773dc
2 changed files with 4 additions and 1 deletions

View File

@ -48,9 +48,10 @@ endif()
ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(include)
OPTION(ENABLE_EXAMPLES "Should the examples be built" ON) OPTION(ENABLE_EXAMPLES "Should the examples be built" ON)
SET(BUILD_EXAMPLES OFF)
IF(ENABLE_EXAMPLES) IF(ENABLE_EXAMPLES)
ADD_SUBDIRECTORY(examples) ADD_SUBDIRECTORY(examples)
ELSE()
SET(BUILD_EXAMPLES OFF)
ENDIF() ENDIF()
INCLUDE(Packaging.cmake) INCLUDE(Packaging.cmake)

View File

@ -11,4 +11,6 @@ if(Qt5OpenGL_FOUND)
ADD_SUBDIRECTORY(SmoothLOD) ADD_SUBDIRECTORY(SmoothLOD)
ADD_SUBDIRECTORY(DecodeOnGPU) ADD_SUBDIRECTORY(DecodeOnGPU)
ADD_SUBDIRECTORY(Python) ADD_SUBDIRECTORY(Python)
else()
SET(BUILD_EXAMPLES OFF PARENT_SCOPE)
endif() endif()