diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-08 10:07:20 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-08 10:27:31 +0200 |
commit | f55ffa11e8b3ff5175d749991759b5c48fa386c4 (patch) | |
tree | 6529c0e26828e6f4c01c1d4964dd2e13b0de681b | |
parent | e4cb9703cc6810dbe07070b485ea866f00ba9252 (diff) |
proto/vjoy: update .dll
-rw-r--r-- | proto-vjoy/CMakeLists.txt | 13 | ||||
-rw-r--r-- | proto-vjoy/ftnoir_protocol_vjoy.h | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/proto-vjoy/CMakeLists.txt b/proto-vjoy/CMakeLists.txt index 5584c876..eb2246a2 100644 --- a/proto-vjoy/CMakeLists.txt +++ b/proto-vjoy/CMakeLists.txt @@ -5,14 +5,15 @@ if(WIN32) if(CMAKE_COMPILER_IS_GNUCXX) set(link "-Wl,--enable-stdcall-fixup") endif() - opentrack_boilerplate(opentrack-proto-vjoy LINK "${link}") - if(MSVC) - set(ext .lib) + if(opentrack-64bit) + set(arch 64) else() - set(ext .dll) + set(arch 32) endif() - target_link_libraries(opentrack-proto-vjoy ${MY_QT_LIBS} ${SDK_VJOY}/VJoy${ext}) + set(lib ${SDK_VJOY}/VJoy${arch}.dll) + opentrack_boilerplate(opentrack-proto-vjoy LINK "${link}") + target_link_libraries(opentrack-proto-vjoy "${lib}") target_include_directories(opentrack-proto-vjoy SYSTEM PUBLIC ${SDK_VJOY}) - install(FILES "${SDK_VJOY}/VJoy.dll" DESTINATION . ${opentrack-perms}) + install(FILES "${lib}" DESTINATION .) endif() endif() diff --git a/proto-vjoy/ftnoir_protocol_vjoy.h b/proto-vjoy/ftnoir_protocol_vjoy.h index 118306b5..fb60ef41 100644 --- a/proto-vjoy/ftnoir_protocol_vjoy.h +++ b/proto-vjoy/ftnoir_protocol_vjoy.h @@ -79,10 +79,11 @@ typedef struct _JOYSTICK_STATE UINT32 Buttons; // 32 Buttons } JOYSTICK_STATE, * PJOYSTICK_STATE; +#define VJOY_API extern "C" #ifndef _MSC_VER -EXTERN_C BOOL __stdcall VJoy_Initialize(PCHAR name, PCHAR serial); -EXTERN_C VOID __stdcall VJoy_Shutdown(); -EXTERN_C BOOL __stdcall VJoy_UpdateJoyState(int id, PJOYSTICK_STATE pJoyState); +VJOY_API BOOL __stdcall VJoy_Initialize(PCHAR name, PCHAR serial); +VJOY_API VOID __stdcall VJoy_Shutdown(); +VJOY_API BOOL __stdcall VJoy_UpdateJoyState(int id, PJOYSTICK_STATE pJoyState); #else #define VJOY_API __declspec(dllimport) VJOY_API BOOL __stdcall VJoy_Initialize(PCHAR name, PCHAR serial); |