summaryrefslogtreecommitdiffhomepage
path: root/proto-vjoy/CMakeLists.txt
blob: 5584c87602856105c92046be6a988e3f351102b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()
        opentrack_boilerplate(opentrack-proto-vjoy LINK "${link}")
        if(MSVC)
            set(ext .lib)
        else()
            set(ext .dll)
        endif()
        target_link_libraries(opentrack-proto-vjoy ${MY_QT_LIBS} ${SDK_VJOY}/VJoy${ext})
        target_include_directories(opentrack-proto-vjoy SYSTEM PUBLIC ${SDK_VJOY})
        install(FILES "${SDK_VJOY}/VJoy.dll" DESTINATION . ${opentrack-perms})
    endif()
endif()