[Bf-blender-cvs] [8b7d2d8eb20] master: CMake: use BULLET_LIBRARIES for both extern_bullet and system libraries

Campbell Barton noreply at git.blender.org
Thu Jan 19 07:31:49 CET 2023


Commit: 8b7d2d8eb2055ffe26ec242524788706b0817a4c
Author: Campbell Barton
Date:   Thu Jan 19 17:07:21 2023 +1100
Branches: master
https://developer.blender.org/rB8b7d2d8eb2055ffe26ec242524788706b0817a4c

CMake: use BULLET_LIBRARIES for both extern_bullet and system libraries

There was no need to differentiate between these and it made
the CMake files more verbose.

===================================================================

M	CMakeLists.txt
M	intern/rigidbody/CMakeLists.txt
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/bmesh/CMakeLists.txt
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/nodes/CMakeLists.txt
M	source/blender/nodes/geometry/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b2f4eec61a..252b2d13450 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1262,12 +1262,14 @@ endif()
 # -----------------------------------------------------------------------------
 # Configure Bullet
 
-if(WITH_BULLET AND WITH_SYSTEM_BULLET)
-  find_package(Bullet)
-  set_and_warn_library_found("Bullet" BULLET_FOUND WITH_BULLET)
-else()
-  set(BULLET_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/bullet2/src")
-  # set(BULLET_LIBRARIES "")
+if(WITH_BULLET)
+  if(WITH_SYSTEM_BULLET)
+    find_package(Bullet)
+    set_and_warn_library_found("Bullet" BULLET_FOUND WITH_BULLET)
+  else()
+    set(BULLET_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/bullet2/src")
+    set(BULLET_LIBRARIES "extern_bullet")
+  endif()
 endif()
 
 
diff --git a/intern/rigidbody/CMakeLists.txt b/intern/rigidbody/CMakeLists.txt
index b6911129de4..ef5d7f66040 100644
--- a/intern/rigidbody/CMakeLists.txt
+++ b/intern/rigidbody/CMakeLists.txt
@@ -20,7 +20,6 @@ set(SRC
 )
 
 set(LIB
-  extern_bullet
   ${BULLET_LIBRARIES}
 )
 
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 7e11481b9c8..15c44589291 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -577,13 +577,6 @@ if(WITH_BULLET)
   list(APPEND INC
     ../../../intern/rigidbody
   )
-
-  if(NOT WITH_SYSTEM_BULLET)
-    list(APPEND LIB
-      extern_bullet
-    )
-  endif()
-
   list(APPEND LIB
     bf_intern_rigidbody
 
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index b7370a6e8d7..83bbc8cbf02 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -179,12 +179,6 @@ if(WITH_BULLET)
     ${BULLET_INCLUDE_DIRS}
     ../../../intern/rigidbody
   )
-  if(NOT WITH_SYSTEM_BULLET)
-  list(APPEND LIB
-    extern_bullet
-    )
-  endif()
-
   list(APPEND LIB
     ${BULLET_LIBRARIES}
   )
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 910876fa361..30ddca5e47d 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -158,11 +158,9 @@ if(WITH_OPENSUBDIV)
 endif()
 
 if(WITH_BULLET)
-  if(NOT WITH_SYSTEM_BULLET)
-    list(APPEND LIB
-      extern_bullet
-    )
-  endif()
+  list(APPEND LIB
+    ${BULLET_LIBRARIES}
+  )
   add_definitions(-DWITH_BULLET)
 endif()
 
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 27da5f6cf8e..e6c0510e9f5 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -92,12 +92,6 @@ if(WITH_BULLET)
     ${BULLET_INCLUDE_DIRS}
     ../../../intern/rigidbody
   )
-  if(NOT WITH_SYSTEM_BULLET)
-  list(APPEND LIB
-    extern_bullet
-  )
-  endif()
-
   list(APPEND LIB
     ${BULLET_LIBRARIES}
   )
diff --git a/source/blender/nodes/geometry/CMakeLists.txt b/source/blender/nodes/geometry/CMakeLists.txt
index 396fd794865..eecc79f2b12 100644
--- a/source/blender/nodes/geometry/CMakeLists.txt
+++ b/source/blender/nodes/geometry/CMakeLists.txt
@@ -196,12 +196,6 @@ if(WITH_BULLET)
     ${BULLET_INCLUDE_DIRS}
     ../../../../intern/rigidbody
   )
-  if(NOT WITH_SYSTEM_BULLET)
-  list(APPEND LIB
-    extern_bullet
-    )
-  endif()
-
   list(APPEND LIB
     ${BULLET_LIBRARIES}
   )



More information about the Bf-blender-cvs mailing list