Jelajahi Sumber

Ability to not generate the samples / the viewer

Jorrit Rouwe 3 tahun lalu
induk
melakukan
871743969c
1 mengubah file dengan 11 tambahan dan 3 penghapusan
  1. 11 3
      Build/CMakeLists.txt

+ 11 - 3
Build/CMakeLists.txt

@@ -6,6 +6,8 @@ project(JoltPhysics CXX)
 option(TARGET_UNIT_TESTS "Build Unit Tests" ON)
 option(TARGET_UNIT_TESTS "Build Unit Tests" ON)
 option(TARGET_HELLO_WORLD "Build Hello World" ON)
 option(TARGET_HELLO_WORLD "Build Hello World" ON)
 option(TARGET_PERFORMANCE_TEST "Build Performance Test" ON)
 option(TARGET_PERFORMANCE_TEST "Build Performance Test" ON)
+option(TARGET_SAMPLES "Build Samples" ON)
+option(TARGET_VIEWER "Build JoltViewer" ON)
 
 
 # Select X86 processor features to use (if everything is off it will be SSE2 compatible)
 # Select X86 processor features to use (if everything is off it will be SSE2 compatible)
 option(USE_SSE4_1 "Enable SSE4.1" ON)
 option(USE_SSE4_1 "Enable SSE4.1" ON)
@@ -219,7 +221,13 @@ endif()
 
 
 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
 	# Windows only targets
 	# Windows only targets
-	include(${PHYSICS_REPO_ROOT}/TestFramework/TestFramework.cmake)
-	include(${PHYSICS_REPO_ROOT}/Samples/Samples.cmake)
-	include(${PHYSICS_REPO_ROOT}/JoltViewer/JoltViewer.cmake)
+	if (TARGET_SAMPLES OR TARGET_VIEWER)
+		include(${PHYSICS_REPO_ROOT}/TestFramework/TestFramework.cmake)
+	endif()
+	if (TARGET_SAMPLES)
+		include(${PHYSICS_REPO_ROOT}/Samples/Samples.cmake)
+	endif()
+	if (TARGET_VIEWER)
+		include(${PHYSICS_REPO_ROOT}/JoltViewer/JoltViewer.cmake)
+	endif()
 endif()
 endif()