Skip to content

Commit

Permalink
ODE: now can built with -fvisibility=hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Nov 8, 2018
1 parent 814b9ec commit ff0d32c
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 74 deletions.
2 changes: 1 addition & 1 deletion Externals/ode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_dir("${DIRS}")

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include )

add_definitions(-DdSINGLE -D_SECURE_SCL=0 -DLINUX -D_cdecl= -D__forceinline=inline -fvisibility=default)
add_definitions(-DdSINGLE -D_SECURE_SCL=0 -DLINUX -D_cdecl= -D__forceinline=inline)

add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
xr_install(${PROJECT_NAME})
2 changes: 1 addition & 1 deletion Externals/ode/include/ode/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ typedef struct dJointFeedback {
* when the ODE step function updates the body state.
*/

void dGeomMoved (dGeomID);
ODE_API void dGeomMoved (dGeomID);
dGeomID dGeomGetBodyNext (dGeomID);


Expand Down
4 changes: 4 additions & 0 deletions Externals/ode/include/ode/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ extern "C" {
#elif !defined(ODE_LIB)
#define ODE_DLL_API __declspec(dllimport)
#endif
#else
#if defined(__GNUC__) && __GNUC__ >=4
#define ODE_API __attribute__ ((visibility("default")))
#endif
#endif

#if !defined(ODE_API)
Expand Down
10 changes: 5 additions & 5 deletions Externals/ode/include/ode/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,10 @@ ODE_API dBodyID dBodyCreate (dWorldID);
*/
ODE_API void dBodyDestroy (dBodyID);

void dWorldAddBody (dWorldID,dBodyID); // X-Ray custom probably
void dWorldAddJoint (dWorldID,dJointID); // X-Ray custom probably
void dWorldRemoveBody (dWorldID,dBodyID); // X-Ray custom probably
void dWorldRemoveJoint (dWorldID,dJointID); // X-Ray custom probably
ODE_API void dWorldAddBody (dWorldID,dBodyID); // X-Ray custom probably
ODE_API void dWorldAddJoint (dWorldID,dJointID); // X-Ray custom probably
ODE_API void dWorldRemoveBody (dWorldID,dBodyID); // X-Ray custom probably
ODE_API void dWorldRemoveJoint (dWorldID,dJointID); // X-Ray custom probably

/**
* @brief Set the body's user-data pointer.
Expand Down Expand Up @@ -989,7 +989,7 @@ ODE_API dJointID dJointCreateSlider (dWorldID, dJointGroupID);
* If it is nonzero the joint is allocated in the given joint group.
*/
ODE_API dJointID dJointCreateContact (dWorldID, dJointGroupID, const dContact *);
dJointID dJointCreateContactSpecial (dWorldID, dJointGroupID, const dContact *); // XXX: GSC custom?
ODE_API dJointID dJointCreateContactSpecial (dWorldID, dJointGroupID, const dContact *); // XXX: GSC custom?

/**
* @brief Create a new joint of the hinge2 type.
Expand Down
4 changes: 2 additions & 2 deletions Externals/ode/ode/src/collision_std.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ int dCollideCapsulePlane (dxGeom *o1, dxGeom *o2, int flags,
#ifdef __cplusplus
extern "C" {
#endif
int dCollideRaySphere (dxGeom *o1, dxGeom *o2, int flags,
ODE_API int dCollideRaySphere (dxGeom *o1, dxGeom *o2, int flags,
dContactGeom *contact, int skip);
int dCollideRayBox (dxGeom *o1, dxGeom *o2, int flags,
ODE_API int dCollideRayBox (dxGeom *o1, dxGeom *o2, int flags,
dContactGeom *contact, int skip);
int dCollideRayCapsule (dxGeom *o1, dxGeom *o2,
int flags, dContactGeom *contact, int skip);
Expand Down
Loading

0 comments on commit ff0d32c

Please sign in to comment.