Statically link bullet3
This commit is contained in:
parent
1dacf19af3
commit
6f1b907c04
5
.gitmodules
vendored
5
.gitmodules
vendored
@ -3,4 +3,7 @@
|
|||||||
url = https://github.com/MrLetsplay2003/microtar.git
|
url = https://github.com/MrLetsplay2003/microtar.git
|
||||||
[submodule "dependencies/openvr"]
|
[submodule "dependencies/openvr"]
|
||||||
path = dependencies/openvr
|
path = dependencies/openvr
|
||||||
url = https://github.com/ValveSoftware/openvr
|
url = https://github.com/ValveSoftware/openvr.git
|
||||||
|
[submodule "dependencies/bullet3"]
|
||||||
|
path = dependencies/bullet3
|
||||||
|
url = https://github.com/bulletphysics/bullet3.git
|
||||||
|
@ -44,6 +44,19 @@ endif()
|
|||||||
|
|
||||||
add_subdirectory(dependencies/microtar)
|
add_subdirectory(dependencies/microtar)
|
||||||
|
|
||||||
|
# set(BUILD_SHARED_LIBS OFF)
|
||||||
|
# set(BUILD_CPU_DEMOS OFF)
|
||||||
|
# set(BUILD_BULLET2_DEMOS OFF)
|
||||||
|
# set(BUILD_OPENGL3_DEMOS OFF)
|
||||||
|
# set(BUILD_UNIT_TESTS OFF)
|
||||||
|
# set(BUILD_EXTRAS OFF)
|
||||||
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
# set(POSITION_INDEPENDENT_CODE ON CACHE BOOL "Enable stuff")
|
||||||
|
# set(BUILD_SHARED_LIBS ON CACHE BOOL "Enable stuff")
|
||||||
|
add_subdirectory(dependencies/bullet3 EXCLUDE_FROM_ALL)
|
||||||
|
# set_property(DIRECTORY dependencies/bullet3 PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||||
|
# set_property(DIRECTORY dependencies/bullet3 PROPERTY BUILD_SHARED_LIBS 1)
|
||||||
|
|
||||||
# kekengine resources
|
# kekengine resources
|
||||||
add_custom_target(kekengine_res ALL DEPENDS ${KEKENGINE_RESOURCE_FILES})
|
add_custom_target(kekengine_res ALL DEPENDS ${KEKENGINE_RESOURCE_FILES})
|
||||||
|
|
||||||
@ -59,6 +72,8 @@ add_library(kekengine OBJECT ${KEKENGINE_SOURCE_FILES})
|
|||||||
set_property(TARGET kekengine PROPERTY POSITION_INDEPENDENT_CODE 1)
|
set_property(TARGET kekengine PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||||
add_dependencies(kekengine kekengine_res)
|
add_dependencies(kekengine kekengine_res)
|
||||||
|
|
||||||
|
target_include_directories(kekengine PRIVATE "dependencies/bullet3/src")
|
||||||
|
|
||||||
target_link_libraries(kekengine PUBLIC microtar_static)
|
target_link_libraries(kekengine PUBLIC microtar_static)
|
||||||
|
|
||||||
# Freetype
|
# Freetype
|
||||||
@ -68,9 +83,9 @@ pkg_check_modules(FREETYPE REQUIRED freetype2)
|
|||||||
target_link_libraries(kekengine PUBLIC ${FREETYPE_LIBRARIES})
|
target_link_libraries(kekengine PUBLIC ${FREETYPE_LIBRARIES})
|
||||||
target_include_directories(kekengine PUBLIC ${FREETYPE_INCLUDE_DIRS})
|
target_include_directories(kekengine PUBLIC ${FREETYPE_INCLUDE_DIRS})
|
||||||
|
|
||||||
pkg_check_modules(BULLET REQUIRED bullet)
|
#pkg_check_modules(BULLET REQUIRED bullet)
|
||||||
target_link_libraries(kekengine PUBLIC ${BULLET_LIBRARIES})
|
#target_link_libraries(kekengine PUBLIC ${BULLET_LIBRARIES})
|
||||||
target_include_directories(kekengine PUBLIC ${BULLET_INCLUDE_DIRS})
|
#target_include_directories(kekengine PUBLIC ${BULLET_INCLUDE_DIRS})
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(kekengine PUBLIC glfw GLEW GL)
|
target_link_libraries(kekengine PUBLIC glfw GLEW GL)
|
||||||
@ -107,9 +122,12 @@ endif()
|
|||||||
|
|
||||||
add_library(kekengine_shared SHARED $<TARGET_OBJECTS:kekengine>)
|
add_library(kekengine_shared SHARED $<TARGET_OBJECTS:kekengine>)
|
||||||
target_link_libraries(kekengine_shared PUBLIC kekengine)
|
target_link_libraries(kekengine_shared PUBLIC kekengine)
|
||||||
|
target_link_libraries(kekengine_shared PUBLIC Bullet3Collision BulletDynamics BulletCollision LinearMath Bullet3Collision Bullet3Common Bullet3Dynamics Bullet3Geometry BulletInverseDynamics)
|
||||||
set_target_properties(kekengine_shared PROPERTIES OUTPUT_NAME kekengine)
|
set_target_properties(kekengine_shared PROPERTIES OUTPUT_NAME kekengine)
|
||||||
|
|
||||||
add_library(kekengine_static STATIC $<TARGET_OBJECTS:kekengine>)
|
add_library(kekengine_static STATIC $<TARGET_OBJECTS:kekengine>)
|
||||||
target_link_libraries(kekengine_static PUBLIC kekengine)
|
target_link_libraries(kekengine_static PUBLIC kekengine)
|
||||||
|
target_link_libraries(kekengine_static PUBLIC BulletSoftBody BulletDynamics BulletCollision LinearMath Bullet3Collision Bullet3Common Bullet3Dynamics Bullet3Geometry BulletInverseDynamics)
|
||||||
set_target_properties(kekengine_static PROPERTIES OUTPUT_NAME kekengine)
|
set_target_properties(kekengine_static PROPERTIES OUTPUT_NAME kekengine)
|
||||||
|
|
||||||
if(${KEKENGINE_BUILD_KEKGAME})
|
if(${KEKENGINE_BUILD_KEKGAME})
|
||||||
@ -134,4 +152,5 @@ if(${KEKENGINE_BUILD_KEKGAME})
|
|||||||
|
|
||||||
target_link_libraries(kekgame PUBLIC kekengine_static)
|
target_link_libraries(kekgame PUBLIC kekengine_static)
|
||||||
target_include_directories(kekgame PRIVATE "src/kekengine/include")
|
target_include_directories(kekgame PRIVATE "src/kekengine/include")
|
||||||
|
target_include_directories(kekgame PRIVATE "dependencies/bullet3/src")
|
||||||
endif()
|
endif()
|
||||||
|
1
dependencies/bullet3
vendored
Submodule
1
dependencies/bullet3
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 39b8de74df93721add193e5b3d9ebee579faebf8
|
@ -5,8 +5,7 @@
|
|||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
#include <BulletCollision/CollisionShapes/btBoxShape.h>
|
#include <BulletCollision/CollisionShapes/btBoxShape.h>
|
||||||
#include <BulletCollision/btBulletCollisionCommon.h>
|
#include <btBulletCollisionCommon.h>
|
||||||
#include <BulletCollision/btBulletCollisionCommon.h>
|
|
||||||
#include <btBulletDynamicsCommon.h>
|
#include <btBulletDynamicsCommon.h>
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user