From f1d5672818e766524d554acde2286034f9dd1da6 Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Mon, 15 Mar 2021 17:11:19 -0500 Subject: [PATCH] Add bullet thirdparty library --- CMakeLists.txt | 1 - core/CMakeLists.txt | 8 -------- thirdparty/CMakeLists.txt | 7 +++++++ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 470bd18..a31dac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,6 @@ target_include_directories(couchlib if(WIN32) target_link_libraries(couch glfw3dll) target_link_libraries(couch ssp) - set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") endif(WIN32) install(TARGETS couch couchlib) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 2c76e34..6389d5b 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -5,9 +5,6 @@ find_package(OpenGL REQUIRED) find_package(GLEW REQUIRED) find_package(glfw3 3.3 REQUIRED) -## Find Bullet -find_package(Bullet REQUIRED) - if (LUA_ENABLED) ## Find Lua find_package(Lua REQUIRED) @@ -81,17 +78,12 @@ target_include_directories(couchlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_include_directories(couchlib - PUBLIC - ${BULLET_INCLUDE_DIRS}) - target_link_libraries(couchlib glfw) target_link_libraries(couchlib OpenGL::GL) target_link_libraries(couchlib GLEW::GLEW) if (LUA_ENABLED) target_link_libraries(couchlib_luascripting ${LUA_LIBRARIES}) endif () -target_link_libraries(couchlib ${BULLET_LIBRARIES}) ## Add documentation find_package(Doxygen REQUIRED diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 1f389d2..d061a89 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -10,3 +10,10 @@ target_include_directories(couchlib PUBLIC assimp/include) target_link_libraries(couchlib assimp::assimp) + +## Bullet +add_subdirectory(bullet) +target_include_directories(couchlib + PUBLIC + bullet/src) +target_link_libraries(couchlib LinearMath Bullet3Common BulletCollision BulletDynamics)