diff options
Diffstat (limited to 'proto-vjoy/CMakeLists.txt')
-rw-r--r-- | proto-vjoy/CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/proto-vjoy/CMakeLists.txt b/proto-vjoy/CMakeLists.txt index eb2246a2..1c4f7fb9 100644 --- a/proto-vjoy/CMakeLists.txt +++ b/proto-vjoy/CMakeLists.txt @@ -1,19 +1,23 @@ if(WIN32) set(SDK_VJOY "" CACHE PATH "VJoy SDK path") if(SDK_VJOY) - set(link "") - if(CMAKE_COMPILER_IS_GNUCXX) - set(link "-Wl,--enable-stdcall-fixup") - endif() if(opentrack-64bit) set(arch 64) else() set(arch 32) endif() set(lib ${SDK_VJOY}/VJoy${arch}.dll) + if (MSVC) + set(implib "${SDK_VJOY}/VJoy${arch}.lib") + else() + set(implib "${lib}") + endif() + if(CMAKE_COMPILER_IS_GNUCXX) + set(link "-Wl,--enable-stdcall-fixup") + endif() opentrack_boilerplate(opentrack-proto-vjoy LINK "${link}") - target_link_libraries(opentrack-proto-vjoy "${lib}") + target_link_libraries(opentrack-proto-vjoy "${implib}") target_include_directories(opentrack-proto-vjoy SYSTEM PUBLIC ${SDK_VJOY}) - install(FILES "${lib}" DESTINATION .) + install(FILES "${lib}" DESTINATION . RENAME "VJoy.dll") endif() endif() |