From b64e9c713cff459f88913d2c16b02ea13dfbd3d3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 8 Jul 2016 10:50:45 +0200 Subject: proto/vjoy: rename .dll as linkage expects --- proto-vjoy/CMakeLists.txt | 16 ++++++++++------ 1 file 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() -- cgit v1.2.3