From 8ff4b5187ac0cb67e1cf751b5dbd55afea42e255 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Thu, 27 Sep 2018 11:48:12 +0800 Subject: [PATCH] fix mingw build --- .../GwenGUISupport/GwenParameterInterface.cpp | 1 + examples/RobotSimulator/CMakeLists.txt | 30 ++++++------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/examples/ExampleBrowser/GwenGUISupport/GwenParameterInterface.cpp b/examples/ExampleBrowser/GwenGUISupport/GwenParameterInterface.cpp index afa3d5f4d..93ec0fd7a 100644 --- a/examples/ExampleBrowser/GwenGUISupport/GwenParameterInterface.cpp +++ b/examples/ExampleBrowser/GwenGUISupport/GwenParameterInterface.cpp @@ -1,5 +1,6 @@ #include "GwenParameterInterface.h" #include "gwenInternalData.h" +#include struct MyButtonEventHandler : public Gwen::Event::Handler { diff --git a/examples/RobotSimulator/CMakeLists.txt b/examples/RobotSimulator/CMakeLists.txt index 74b100752..6a0553a76 100644 --- a/examples/RobotSimulator/CMakeLists.txt +++ b/examples/RobotSimulator/CMakeLists.txt @@ -26,13 +26,6 @@ IF(BUILD_CLSOCKET) ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET) ENDIF(BUILD_CLSOCKET) -IF(WIN32) - LINK_LIBRARIES( - ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} - ) -ENDIF(WIN32) - - #some code to support OpenGL and Glew cross platform IF (WIN32) @@ -67,6 +60,7 @@ SET_TARGET_PROPERTIES(App_RobotSimulator PROPERTIES DEBUG_POSTFIX "_d") SET_TARGET_PROPERTIES(App_RobotSimulator PROPERTIES COMPILE_DEFINITIONS "B3_USE_ROBOTSIM_GUI") +TARGET_LINK_LIBRARIES(App_RobotSimulator BulletRobotics BulletExampleBrowserLib BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen Bullet3Common) IF(WIN32) IF(BUILD_ENET OR BUILD_CLSOCKET) @@ -74,12 +68,6 @@ IF(WIN32) ENDIF(BUILD_ENET OR BUILD_CLSOCKET) ENDIF(WIN32) -TARGET_LINK_LIBRARIES(App_RobotSimulator BulletRobotics BulletExampleBrowserLib BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen Bullet3Common) - - - - - INCLUDE_DIRECTORIES( @@ -103,6 +91,8 @@ SET_TARGET_PROPERTIES(App_RobotSimulator_NoGUI PROPERTIES VERSION ${BULLET_VERSI SET_TARGET_PROPERTIES(App_RobotSimulator_NoGUI PROPERTIES DEBUG_POSTFIX "_d") +TARGET_LINK_LIBRARIES(App_RobotSimulator_NoGUI BulletRobotics BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath Bullet3Common) + IF(WIN32) IF(BUILD_ENET OR BUILD_CLSOCKET) TARGET_LINK_LIBRARIES(App_RobotSimulator_NoGUI ws2_32 Winmm) @@ -114,11 +104,6 @@ ELSE() ENDIF(APPLE) ENDIF(WIN32) -TARGET_LINK_LIBRARIES(App_RobotSimulator_NoGUI BulletRobotics BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath Bullet3Common) - - - - ######## @@ -142,6 +127,8 @@ SET_TARGET_PROPERTIES(App_HelloBulletRobotics PROPERTIES VERSION ${BULLET_VERSIO SET_TARGET_PROPERTIES(App_HelloBulletRobotics PROPERTIES DEBUG_POSTFIX "_d") +TARGET_LINK_LIBRARIES(App_HelloBulletRobotics BulletRobotics BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath Bullet3Common) + IF(WIN32) IF(BUILD_ENET OR BUILD_CLSOCKET) TARGET_LINK_LIBRARIES(App_HelloBulletRobotics ws2_32 Winmm) @@ -153,9 +140,10 @@ ELSE() ENDIF(APPLE) ENDIF(WIN32) -TARGET_LINK_LIBRARIES(App_HelloBulletRobotics BulletRobotics BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath Bullet3Common) - - + +IF(WIN32) + TARGET_LINK_LIBRARIES(App_RobotSimulator ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) +ENDIF(WIN32)