Fix linux|mingw shared|static build
This commit is contained in:
@@ -54,7 +54,7 @@ b3GpuDynamicsWorld::~b3GpuDynamicsWorld()
|
||||
}
|
||||
|
||||
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
int b3GpuDynamicsWorld::stepSimulation( btScalar timeStepUnused, int maxSubStepsUnused, btScalar fixedTimeStep)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//#include "GpuDemo.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h> //for GetLocalTime/GetSystemTime
|
||||
#include <windows.h> //for GetLocalTime/GetSystemTime
|
||||
#else
|
||||
#include <sys/time.h>//gettimeofday
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//#include "GpuDemo.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h> //for GetLocalTime/GetSystemTime
|
||||
#include <windows.h> //for GetLocalTime/GetSystemTime
|
||||
#else
|
||||
#include <sys/time.h>//gettimeofday
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#define NOMINMAX
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#define GwenUtil_VSNPrintFSafe( _DstBuf, _DstSize, _MaxCount, _Format, _ArgList ) vsnprintf_s( _DstBuf, _DstSize, _MaxCount, _Format, _ArgList )
|
||||
|
||||
@@ -38,4 +38,12 @@ ENDIF()
|
||||
|
||||
|
||||
ADD_LIBRARY(OpenGLWindow ${OpenGLWindow_SRCS} ${OpenGLWindow_HDRS})
|
||||
if (UNIX AND NOT APPLE)
|
||||
target_link_libraries(OpenGLWindow X11)
|
||||
endif ()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries(OpenGLWindow Bullet3Common)
|
||||
endif()
|
||||
|
||||
target_link_libraries(OpenGLWindow ${OPENGL_gl_LIBRARY})
|
||||
|
||||
@@ -58,6 +58,9 @@ SET(Bullet3Collision_HDRS
|
||||
)
|
||||
|
||||
ADD_LIBRARY(Bullet3Collision ${Bullet3Collision_SRCS} ${Bullet3Collision_HDRS})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries(Bullet3Collision Bullet3Geometry)
|
||||
endif ()
|
||||
SET_TARGET_PROPERTIES(Bullet3Collision PROPERTIES VERSION ${BULLET_VERSION})
|
||||
SET_TARGET_PROPERTIES(Bullet3Collision PROPERTIES SOVERSION ${BULLET_VERSION})
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ subject to the following restrictions:
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#endif //_WIN32
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ SET(Bullet3Dynamics_HDRS
|
||||
)
|
||||
|
||||
ADD_LIBRARY(Bullet3Dynamics ${Bullet3Dynamics_SRCS} ${Bullet3Dynamics_HDRS})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries(Bullet3Dynamics Bullet3Collision)
|
||||
endif ()
|
||||
SET_TARGET_PROPERTIES(Bullet3Dynamics PROPERTIES VERSION ${BULLET_VERSION})
|
||||
SET_TARGET_PROPERTIES(Bullet3Dynamics PROPERTIES SOVERSION ${BULLET_VERSION})
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ SET(Bullet3Geometry_HDRS
|
||||
)
|
||||
|
||||
ADD_LIBRARY(Bullet3Geometry ${Bullet3Geometry_SRCS} ${Bullet3Geometry_HDRS})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries(Bullet3Geometry Bullet3Common)
|
||||
endif()
|
||||
SET_TARGET_PROPERTIES(Bullet3Geometry PROPERTIES VERSION ${BULLET_VERSION})
|
||||
SET_TARGET_PROPERTIES(Bullet3Geometry PROPERTIES SOVERSION ${BULLET_VERSION})
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ ADD_LIBRARY(Bullet3OpenCL_clew ${Bullet3OpenCL_clew_SRCS} ${Bullet3OpenCL_clew_H
|
||||
SET_TARGET_PROPERTIES(Bullet3OpenCL_clew PROPERTIES VERSION ${BULLET_VERSION})
|
||||
SET_TARGET_PROPERTIES(Bullet3OpenCL_clew PROPERTIES SOVERSION ${BULLET_VERSION})
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
TARGET_LINK_LIBRARIES(Bullet3OpenCL_clew LinearMath)
|
||||
TARGET_LINK_LIBRARIES(Bullet3OpenCL_clew LinearMath Bullet3Dynamics)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ IF (INSTALL_LIBS)
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX})
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
|
||||
INSTALL(FILES ../btBullet3OpenCL_clewCommon.h
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/Bullet3OpenCL_clew)
|
||||
# INSTALL(FILES ../btBullet3OpenCL_clewCommon.h
|
||||
#DESTINATION ${INCLUDE_INSTALL_DIR}/Bullet3OpenCL_clew)
|
||||
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ bool gDebugSkipLoadingBinary = false;
|
||||
#define B3_MAX_CL_DEVICES 16 //who needs 16 devices?
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -24,6 +24,9 @@ SET(Bullet2FileLoader_HDRS
|
||||
)
|
||||
|
||||
ADD_LIBRARY(Bullet2FileLoader ${Bullet2FileLoader_SRCS} ${Bullet2FileLoader_HDRS})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries(Bullet2FileLoader Bullet3Common)
|
||||
endif ()
|
||||
SET_TARGET_PROPERTIES(Bullet2FileLoader PROPERTIES VERSION ${BULLET_VERSION})
|
||||
SET_TARGET_PROPERTIES(Bullet2FileLoader PROPERTIES SOVERSION ${BULLET_VERSION})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user