mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-05 15:21:06 +00:00
CMake: Also link Threads correctly in examples/
This commit is contained in:
parent
6442613ba6
commit
d248271e38
@ -84,7 +84,8 @@ ELSE(WIN32)
|
||||
ADD_DEFINITIONS("-DGLEW_STATIC")
|
||||
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
||||
|
||||
LINK_LIBRARIES( pthread ${DL} )
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
@ -61,11 +61,12 @@ IF (BUILD_SHARED_LIBS)
|
||||
BulletInverseDynamics LinearMath OpenGLWindow gwen BussIK
|
||||
${COCOA} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
ELSE(APPLE)
|
||||
ELSE(APPLE)
|
||||
FIND_PACKAGE(Threads)
|
||||
TARGET_LINK_LIBRARIES(
|
||||
BulletExampleBrowserLib Bullet3Common BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils
|
||||
BulletInverseDynamics LinearMath OpenGLWindow gwen BussIK
|
||||
pthread ${DL}
|
||||
${CMAKE_THREAD_LIBS_INIT} ${DL}
|
||||
)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
@ -116,7 +117,8 @@ ELSE(WIN32)
|
||||
ADD_DEFINITIONS("-DGLEW_STATIC")
|
||||
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
||||
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/glad )
|
||||
LINK_LIBRARIES( pthread ${DL})
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
@ -58,7 +58,8 @@ ELSE(WIN32)
|
||||
ADD_DEFINITIONS("-DGLEW_STATIC")
|
||||
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
||||
|
||||
LINK_LIBRARIES( pthread ${DL} )
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
@ -110,7 +111,8 @@ IF(WIN32)
|
||||
ELSE()
|
||||
IF(APPLE)
|
||||
ELSE(APPLE)
|
||||
TARGET_LINK_LIBRARIES( App_RobotSimulator_NoGUI pthread ${DL} )
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
@ -144,10 +146,10 @@ IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(App_HelloBulletRobotics ws2_32 Winmm)
|
||||
ENDIF(BUILD_ENET OR BUILD_CLSOCKET)
|
||||
ELSE()
|
||||
IF(APPLE)
|
||||
ELSE(APPLE)
|
||||
TARGET_LINK_LIBRARIES( App_HelloBulletRobotics pthread ${DL} )
|
||||
ENDIF(APPLE)
|
||||
IF(NOT APPLE)
|
||||
FIND_PACKAGE(Threads)
|
||||
TARGET_LINK_LIBRARIES( App_HelloBulletRobotics ${CMAKE_THREAD_LIBS_INIT} ${DL} )
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
|
@ -120,8 +120,9 @@ IF (WIN32)
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/build3/bullet.rc
|
||||
)
|
||||
ELSE(WIN32)
|
||||
IF(APPLE)
|
||||
LINK_LIBRARIES( pthread dl )
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
|
||||
IF(APPLE)
|
||||
ADD_EXECUTABLE(App_PhysicsServer_SharedMemory
|
||||
${SharedMemory_SRCS}
|
||||
../MultiThreading/b3PosixThreadSupport.cpp
|
||||
@ -129,8 +130,7 @@ ELSE(WIN32)
|
||||
main.cpp
|
||||
)
|
||||
|
||||
ELSE(APPLE)
|
||||
LINK_LIBRARIES( pthread ${DL} )
|
||||
ELSE(APPLE)
|
||||
ADD_EXECUTABLE(App_PhysicsServer_SharedMemory
|
||||
${SharedMemory_SRCS}
|
||||
../MultiThreading/b3PosixThreadSupport.cpp
|
||||
@ -180,8 +180,9 @@ IF (WIN32)
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/build3/bullet.rc
|
||||
)
|
||||
ELSE(WIN32)
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( ${CMAKE_THREAD_LIBS_INIT} ${DL} )
|
||||
IF(APPLE)
|
||||
LINK_LIBRARIES( pthread dl )
|
||||
FIND_LIBRARY(COCOA NAMES Cocoa)
|
||||
MESSAGE(${COCOA})
|
||||
LINK_LIBRARIES(${COCOA} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
|
||||
@ -197,7 +198,6 @@ ELSE(WIN32)
|
||||
)
|
||||
|
||||
ELSE(APPLE)
|
||||
LINK_LIBRARIES( pthread ${DL} )
|
||||
ADD_DEFINITIONS("-DGLEW_INIT_OPENGL11_FUNCTIONS=1")
|
||||
ADD_DEFINITIONS("-DGLEW_STATIC")
|
||||
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
||||
@ -393,9 +393,10 @@ ELSE(WIN32 OR APPLE)
|
||||
-std=c++11
|
||||
)
|
||||
|
||||
FIND_PACKAGE(Threads)
|
||||
target_link_libraries(App_PhysicsServer_SharedMemory_VR PRIVATE
|
||||
openvr_api
|
||||
pthread
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${DL}
|
||||
Bullet3Common
|
||||
BulletWorldImporter
|
||||
|
@ -37,7 +37,8 @@ ELSE(WIN32)
|
||||
ADD_DEFINITIONS("-DGLEW_STATIC")
|
||||
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
||||
|
||||
LINK_LIBRARIES( X11 pthread ${DL} Xext)
|
||||
FIND_PACKAGE(Threads)
|
||||
LINK_LIBRARIES( X11 ${CMAKE_THREAD_LIBS_INIT} ${DL} Xext )
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user