summaryrefslogtreecommitdiffhomepage
path: root/proto-vjoy/CMakeLists.txt
blob: eb2246a2db340825ecd04d3674a4b86e0f15116e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
        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 "${lib}" DESTINATION .)
    endif()
endif()