make examples optional

This commit is contained in:
Ryan Pavlik
2010-11-11 01:59:10 -06:00
parent 407853aace
commit cb3894d891

View File

@@ -13,8 +13,8 @@ project(wiiuse)
# Set up options # Set up options
### ###
# See the cmake docs about the "option" command if you have build-time configuration, option(BUILD_EXAMPLE "Should we build the example app?" YES)
# such as ifdefs, etc. option(BUILD_EXAMPLE_SDL "Should we build the SDL-based example app?" YES)
### ###
# Perform build configuration of dependencies # Perform build configuration of dependencies
@@ -44,8 +44,13 @@ endif()
add_subdirectory(src) add_subdirectory(src)
# Example apps # Example apps
add_subdirectory(example) if(BUILD_EXAMPLE)
add_subdirectory(example-sdl) add_subdirectory(example)
endif()
if(BUILD_EXAMPLE_SDL)
add_subdirectory(example-sdl)
endif()