From 176867d3e20b5c7ab0ca8d68c9f80fe1ab436bea Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Mon, 15 Mar 2021 17:28:26 -0500 Subject: [PATCH] Revert "Add bullet thirdparty library" This reverts commit f1d5672818e766524d554acde2286034f9dd1da6. --- CMakeLists.txt | 1 + core/CMakeLists.txt | 8 ++++++++ thirdparty/CMakeLists.txt | 7 ------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a31dac8..470bd18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ 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 6389d5b..2c76e34 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -5,6 +5,9 @@ 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) @@ -78,12 +81,17 @@ 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 d061a89..1f389d2 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -10,10 +10,3 @@ 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)