Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8070 for code/branches


Ignore:
Timestamp:
Mar 13, 2011, 11:30:29 PM (14 years ago)
Author:
rgrieder
Message:

Fixed OIS v1.3 build for MinGW 3.4 and hopefully also for the new versions.
This fix needs some additional files in the dependency package though.

Location:
code/branches/mac_osx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/mac_osx/cmake/PackageConfigMSVC.cmake

    r5781 r8070  
    5656  SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    5757  SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     58  # Part of Platform SDK and usually gets linked automatically
     59  SET(WMI_LIBRARY  wbemuuid.lib)
    5860
    5961  # Visual Leak Detector
  • code/branches/mac_osx/cmake/PackageConfigMinGW.cmake

    r5781 r8070  
    5050  SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
    5151
     52  # Not included in MinGW, so we need to supply it for OIS
     53  SET(WMI_INCLUDE_DIR ${DEP_INCLUDE_DIR}/wmi/include)
     54  SET(WMI_LIBRARY     ${DEP_LIBRARY_DIR}/wbemuuid.lib)
     55
    5256ENDIF(MINGW)
  • code/branches/mac_osx/src/external/ois/CMakeLists.txt

    r8065 r8070  
    5656ADD_COMPILER_FLAGS("-D_WIN32_DCOM" MSVC8)
    5757
     58# MinGW doesn't come with some required Windows headers
     59IF(MINGW)
     60  INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
     61ENDIF()
     62
    5863ORXONOX_ADD_LIBRARY(ois_orxonox
    5964  ORXONOX_EXTERNAL
     
    6772
    6873IF(WIN32)
    69   TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES})
     74  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES} ${WMI_LIBRARY})
    7075ELSEIF(APPLE)
    7176  TARGET_LINK_LIBRARIES(ois_orxonox "/System/Library/Frameworks/IOKit.framework" "/System/Library/Frameworks/Carbon.framework")
  • code/branches/mac_osx/src/external/ois/changes_orxonox.diff

    r7516 r8070  
    4949
    5050
     51--- win32/Win32JoyStick.cpp
     52+++ win32/Win32JoyStick.cpp
     53@@ -26,6 +26,14 @@
     54 #include "OISEvents.h"
     55 #include "OISException.h"
     56 
     57+// (Orxonox): Required for MinGW to compile properly
     58+#ifdef __MINGW32__
     59+#  include <oaidl.h>
     60+#  ifndef __MINGW_EXTENSION
     61+#    define __MINGW_EXTENSION __extension__
     62+#  endif
     63+#endif
     64+
     65 #include <cassert>
     66 #include <wbemidl.h>
     67 #include <oleauto.h>
     68@@ -39,6 +47,11 @@
     69    }
     70 #endif
     71 
     72+// (Orxonox): MinGW doesn't have swscanf_s
     73+#ifdef __MINGW32__
     74+#      define swscanf_s swscanf
     75+#endif
     76+
     77 #ifdef OIS_WIN32_XINPUT_SUPPORT
     78 #      pragma comment(lib, "xinput.lib")
     79 #endif
     80@@ -583,7 +596,12 @@
     81     bool bCleanupCOM = SUCCEEDED(hr);
     82 
     83     // Create WMI
     84+    // (Orxonox): Fix for MinGW
     85+#ifdef __MINGW32__
     86+    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
     87+#else
     88     hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
     89+#endif
     90     if( FAILED(hr) || pIWbemLocator == NULL )
     91         goto LCleanup;
     92 
     93
    5194--- mac/MacHIDManager.cpp
    5295+++ mac/MacHIDManager.cpp
  • code/branches/mac_osx/src/external/ois/win32/Win32JoyStick.cpp

    r8069 r8070  
    2626#include "OISEvents.h"
    2727#include "OISException.h"
     28
     29// (Orxonox): Required for MinGW to compile properly
     30#ifdef __MINGW32__
     31#  include <oaidl.h>
     32#  ifndef __MINGW_EXTENSION
     33#    define __MINGW_EXTENSION __extension__
     34#  endif
     35#endif
    2836
    2937#include <cassert>
Note: See TracChangeset for help on using the changeset viewer.