소스 검색

[CMake] add WITH_BULLET and WITH_DIRECTX options too

Andy Li 7 년 전
부모
커밋
71c1f86604
1개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 10 2
      libs/CMakeLists.txt

+ 10 - 2
libs/CMakeLists.txt

@@ -9,10 +9,18 @@ function(set_as_hdll target)
     )
 endfunction()
 
-add_subdirectory(bullet)
+if(WIN32)
+    option(WITH_BULLET "Build bullet.hdll." ON)
+    if(WITH_BULLET)
+        add_subdirectory(bullet)
+    endif()
+endif()
 
 if(WIN32)
-	add_subdirectory(directx)
+    option(WITH_DIRECTX "Build directx.hdll." ON)
+    if(WITH_DIRECTX)
+        add_subdirectory(directx)
+    endif()
 endif()
 
 option(WITH_FMT "Build fmt.hdll." ON)