mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
don't force requirement of BOTH debug/release Bullet
This commit is contained in:
parent
945b556e26
commit
f0f7bca5db
2 changed files with 32 additions and 34 deletions
|
@ -167,7 +167,7 @@ cmake .. -G "Visual Studio 12"
|
||||||
msbuild BULLET_PHYSICS.sln /p:Configuration=Debug
|
msbuild BULLET_PHYSICS.sln /p:Configuration=Debug
|
||||||
```
|
```
|
||||||
|
|
||||||
This will create Debug libraries in cmakebuild\lib\Debug you can replace Debug with Release in the msbuild command and that will generate Release libraries in cmakebuild\lib\Release.
|
This will create Debug libraries in cmakebuild\lib\Debug. You can replace Debug with Release in the msbuild command and that will generate Release libraries in cmakebuild\lib\Release.
|
||||||
|
|
||||||
You now have Bullet libraries compiled, now you need to put them in the right place for hifi to find them:
|
You now have Bullet libraries compiled, now you need to put them in the right place for hifi to find them:
|
||||||
|
|
||||||
|
|
|
@ -35,27 +35,36 @@ include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||||
hifi_library_search_hints("bullet")
|
hifi_library_search_hints("bullet")
|
||||||
|
|
||||||
macro(_FIND_BULLET_LIBRARY _var)
|
macro(_FIND_BULLET_LIBRARY _var)
|
||||||
find_library(${_var}
|
set(_${_var}_NAMES ${ARGN})
|
||||||
NAMES
|
find_library(${_var}_LIBRARY_RELEASE
|
||||||
${ARGN}
|
NAMES ${_${_var}_NAMES}
|
||||||
HINTS
|
HINTS
|
||||||
${BULLET_SEARCH_DIRS}
|
${BULLET_SEARCH_DIRS}
|
||||||
$ENV{BULLET_ROOT_DIR}
|
$ENV{BULLET_ROOT_DIR}
|
||||||
${BULLET_ROOT}
|
${BULLET_ROOT}
|
||||||
${BULLET_ROOT}/out/release8/libs
|
PATH_SUFFIXES lib lib/Release out/release8/libs
|
||||||
${BULLET_ROOT}/out/debug8/libs
|
|
||||||
PATH_SUFFIXES lib lib/Release lib/Debug
|
|
||||||
)
|
)
|
||||||
mark_as_advanced(${_var})
|
|
||||||
endmacro()
|
foreach(_NAME IN LISTS _${_var}_NAMES)
|
||||||
|
list(APPEND _${_var}_DEBUG_NAMES "${_NAME}_Debug")
|
||||||
macro(_BULLET_APPEND_LIBRARIES _list _release)
|
list(APPEND _${_var}_DEBUG_NAMES "${_NAME}_d")
|
||||||
set(_debug ${_release}_DEBUG)
|
endforeach()
|
||||||
if(${_debug})
|
|
||||||
set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
|
find_library(${_var}_LIBRARY_DEBUG
|
||||||
else()
|
NAMES ${_${_var}_DEBUG_NAMES}
|
||||||
set(${_list} ${${_list}} ${${_release}})
|
HINTS
|
||||||
endif()
|
${BULLET_SEARCH_DIRS}
|
||||||
|
$ENV{BULLET_ROOT_DIR}
|
||||||
|
${BULLET_ROOT}
|
||||||
|
PATH_SUFFIXES lib lib/Debug out/debug8/libs
|
||||||
|
)
|
||||||
|
|
||||||
|
select_library_configurations(${_var})
|
||||||
|
|
||||||
|
message(STATUS ${${_var}_LIBRARY})
|
||||||
|
|
||||||
|
mark_as_advanced(${_var}_LIBRARY)
|
||||||
|
mark_as_advanced(${_var}_LIBRARY)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
|
find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
|
||||||
|
@ -69,25 +78,14 @@ find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
|
||||||
|
|
||||||
# Find the libraries
|
# Find the libraries
|
||||||
|
|
||||||
_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics)
|
_FIND_BULLET_LIBRARY(BULLET_DYNAMICS BulletDynamics)
|
||||||
_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d)
|
_FIND_BULLET_LIBRARY(BULLET_COLLISION BulletCollision)
|
||||||
_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision)
|
_FIND_BULLET_LIBRARY(BULLET_MATH BulletMath LinearMath)
|
||||||
_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d)
|
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY BulletSoftBody)
|
||||||
_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath)
|
|
||||||
_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_Debug LinearMath_d)
|
|
||||||
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody)
|
|
||||||
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d)
|
|
||||||
|
|
||||||
|
set(BULLET_INCLUDE_DIRS ${BULLET_INCLUDE_DIR})
|
||||||
|
|
||||||
find_package_handle_standard_args(Bullet "Could NOT find Bullet, try to set the path to Bullet root folder in the system variable BULLET_ROOT_DIR"
|
find_package_handle_standard_args(Bullet "Could NOT find Bullet, try to set the path to Bullet root folder in the system variable BULLET_ROOT_DIR"
|
||||||
BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY
|
BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY
|
||||||
BULLET_INCLUDE_DIR
|
BULLET_INCLUDE_DIRS
|
||||||
)
|
)
|
||||||
|
|
||||||
set(BULLET_INCLUDE_DIRS ${BULLET_INCLUDE_DIR})
|
|
||||||
if(BULLET_FOUND)
|
|
||||||
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_DYNAMICS_LIBRARY)
|
|
||||||
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_COLLISION_LIBRARY)
|
|
||||||
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_MATH_LIBRARY)
|
|
||||||
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_SOFTBODY_LIBRARY)
|
|
||||||
endif()
|
|
||||||
|
|
Loading…
Reference in a new issue