diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-08 10:50:45 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-08 10:50:45 +0200 |
commit | b64e9c713cff459f88913d2c16b02ea13dfbd3d3 (patch) | |
tree | affa04baf3f43fee4b9af5a44a2e8ba21ef12fb6 | |
parent | ee024b59cdb668e86d7cbb1e3fbb2adb95a4ea45 (diff) |
proto/vjoy: rename .dll as linkage expects
-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() |