forked from mirror/openmw-tes3mp
Parse the bullet version in FindBullet.cmake
This commit is contained in:
parent
83a9a164bc
commit
9eb96b9cb6
3 changed files with 11 additions and 6 deletions
|
@ -304,6 +304,9 @@ find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
find_package(OpenAL REQUIRED)
|
find_package(OpenAL REQUIRED)
|
||||||
find_package(Bullet REQUIRED)
|
find_package(Bullet REQUIRED)
|
||||||
|
if (NOT BULLET_FOUND OR BULLET_VERSION VERSION_LESS 283)
|
||||||
|
message(FATAL_ERROR "OpenMW requires Bullet version 2.83 or later")
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories("."
|
include_directories("."
|
||||||
SYSTEM
|
SYSTEM
|
||||||
|
|
|
@ -14,11 +14,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Copyright (c) 2009, Philip Lowman <philip at yhbt.com>
|
# Copyright (c) 2009, Philip Lowman <philip at yhbt.com>
|
||||||
|
# Modified for OpenMW to parse BT_BULLET_VERSION.
|
||||||
#
|
#
|
||||||
# Redistribution AND use is allowed according to the terms of the New
|
# Redistribution AND use is allowed according to the terms of the New
|
||||||
# BSD license.
|
# BSD license.
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
|
include(PreprocessorUtils)
|
||||||
|
|
||||||
set(BULLET_ROOT $ENV{BULLET_ROOT})
|
set(BULLET_ROOT $ENV{BULLET_ROOT})
|
||||||
|
|
||||||
macro(_FIND_BULLET_LIBRARY _var)
|
macro(_FIND_BULLET_LIBRARY _var)
|
||||||
|
@ -75,4 +78,9 @@ if(BULLET_FOUND)
|
||||||
#_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_DYNAMICS_LIBRARY)
|
#_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_DYNAMICS_LIBRARY)
|
||||||
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_COLLISION_LIBRARY)
|
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_COLLISION_LIBRARY)
|
||||||
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_MATH_LIBRARY)
|
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_MATH_LIBRARY)
|
||||||
|
|
||||||
|
find_file(BULLET_BTSCALAR_FILE NAMES btScalar.h PATHS "${BULLET_INCLUDE_DIR}/LinearMath")
|
||||||
|
file(READ ${BULLET_BTSCALAR_FILE} BULLET_BTSCALAR_CONTENT)
|
||||||
|
get_preprocessor_entry(BULLET_BTSCALAR_CONTENT BT_BULLET_VERSION BULLET_VERSION)
|
||||||
|
message(STATUS "Bullet version: ${BULLET_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -6,15 +6,9 @@
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
|
|
||||||
#include <LinearMath/btScalar.h>
|
|
||||||
|
|
||||||
#include "bulletshape.hpp"
|
#include "bulletshape.hpp"
|
||||||
#include "resourcemanager.hpp"
|
#include "resourcemanager.hpp"
|
||||||
|
|
||||||
#if BT_BULLET_VERSION < 283
|
|
||||||
#error "OpenMW requires Bullet version 2.83 or later"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Resource
|
namespace Resource
|
||||||
{
|
{
|
||||||
class SceneManager;
|
class SceneManager;
|
||||||
|
|
Loading…
Reference in a new issue