CMake: Fix compilation with Bullet enabled
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 12 Sep 2018 08:34:53 +0000 (10:34 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 12 Sep 2018 08:34:53 +0000 (10:34 +0200)
Obvious bug in recent CName cleanup commit, while BGE library
was indeed mentioned on that line it was to put Bullet libraries
after all the other libraries.

One day we should really switch to a CMake dependency graph to
take care of library dependencies.

build_files/cmake/macros.cmake

index 5ee1d88bfcb3e84c782b73aeb72089f5eb574407..620c843a15b9abec58f0bb3da8a92d40a0729d34 100644 (file)
@@ -754,6 +754,10 @@ function(SETUP_BLENDER_SORTED_LIBS)
                list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
        endif()
 
+       if(WITH_BULLET AND NOT WITH_SYSTEM_BULLET)
+               list_insert_after(BLENDER_SORTED_LIBS "extern_openjpeg" "extern_bullet")
+       endif()
+
        if(WIN32)
                list(APPEND BLENDER_SORTED_LIBS bf_intern_gpudirect)
        endif()