summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Davis <[email protected]>2014-02-07 08:49:20 -0800
committerBrad Davis <[email protected]>2014-02-07 08:49:20 -0800
commit6c8ba1f0cdd9e2bb435e2bcc6109073e4fbc79c5 (patch)
tree6f70329be12cdc0be0513e5cbc63e0a49aa0a4c4
parent47906cdfdb0d561d5566211ba1f8f02b1fc35963 (diff)
parent4a4c8760ce15091198c5c153b906d74e3511c920 (diff)
Merge pull request #26 from ali1234/stable
Make sample demos optional.
-rw-r--r--CMakeLists.txt54
1 files changed, 29 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc99632..a135609 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,29 +34,33 @@ add_subdirectory(LibOVR)
# Sample code support
#
-# Make sure to set up the OVR include paths
-include_directories(${LibOVR_SOURCE_DIR}/Include)
-include_directories(${LibOVR_SOURCE_DIR}/Src)
-include_directories(${LibOVR_SOURCE_DIR}/Src/Kernel)
-include_directories(${LibOVR_SOURCE_DIR}/Src/Util)
-
-# Cross platform window creation
-add_subdirectory(3rdParty/glfw)
-include_directories(${CMAKE_SOURCE_DIR}/3rdParty/glfw/include)
-
-# Cross platform access to shader functionality
-add_definitions( -DGLEW_STATIC )
-add_subdirectory(3rdParty/glew)
-include_directories(${CMAKE_SOURCE_DIR}/3rdParty/glew/include)
-
-# Used by the sample code to read the tuscany resources
-add_subdirectory(3rdParty/TinyXml)
-include_directories(${CMAKE_SOURCE_DIR}/3rdParty/TinyXml)
-
-add_definitions( -DGL_GLEXT_PROTOTYPES )
-add_subdirectory (Samples/CommonSrc )
-add_subdirectory (Samples/OculusWorldDemo )
-add_subdirectory (Samples/OculusRoomTiny )
-add_subdirectory (Samples/SensorBox )
-add_subdirectory (Samples/TestSensor )
+option(OCULUS_BUILD_SAMPLES "Build Oculus demos" TRUE)
+
+if(OCULUS_BUILD_SAMPLES)
+ # Make sure to set up the OVR include paths
+ include_directories(${LibOVR_SOURCE_DIR}/Include)
+ include_directories(${LibOVR_SOURCE_DIR}/Src)
+ include_directories(${LibOVR_SOURCE_DIR}/Src/Kernel)
+ include_directories(${LibOVR_SOURCE_DIR}/Src/Util)
+
+ # Cross platform window creation
+ add_subdirectory(3rdParty/glfw)
+ include_directories(${CMAKE_SOURCE_DIR}/3rdParty/glfw/include)
+
+ # Cross platform access to shader functionality
+ add_definitions( -DGLEW_STATIC )
+ add_subdirectory(3rdParty/glew)
+ include_directories(${CMAKE_SOURCE_DIR}/3rdParty/glew/include)
+
+ # Used by the sample code to read the tuscany resources
+ add_subdirectory(3rdParty/TinyXml)
+ include_directories(${CMAKE_SOURCE_DIR}/3rdParty/TinyXml)
+
+ add_definitions( -DGL_GLEXT_PROTOTYPES )
+ add_subdirectory (Samples/CommonSrc )
+ add_subdirectory (Samples/OculusWorldDemo )
+ add_subdirectory (Samples/OculusRoomTiny )
+ add_subdirectory (Samples/SensorBox )
+ add_subdirectory (Samples/TestSensor )
+endif()