Browse Source

CMake: Only build 'direct' if BUILD_DIRECT is on.

Sam Edwards 12 years ago
parent
commit
87cae490cd
1 changed files with 6 additions and 3 deletions
  1. 6 3
      CMakeLists.txt

+ 6 - 3
CMakeLists.txt

@@ -26,8 +26,9 @@ include(dtool/Package.cmake)
 include(dtool/Config.cmake)
 
 # Determine which trees to build.
-option(BUILD_DTOOL "Build the dtool source tree." ON)
-option(BUILD_PANDA "Build the panda source tree." ON)
+option(BUILD_DTOOL  "Build the dtool source tree." ON)
+option(BUILD_PANDA  "Build the panda source tree." ON)
+option(BUILD_DIRECT "Build the direct source tree." ON)
 
 # Include Panda3D packages
 if(BUILD_DTOOL)
@@ -38,4 +39,6 @@ if(BUILD_PANDA)
   add_subdirectory(panda)
 endif()
 
-add_subdirectory(direct)
+if(BUILD_DIRECT)
+  add_subdirectory(direct)
+endif()