Build directories use the cmake-build- prefix. The shared GoogleTest binary
is tests/test_libvirtualhid in the build directory. Initialize submodules
before building.
Run each command from the repository root through MSYS2/UCRT64:
& 'C:\msys64\msys2_shell.cmd' -defterm -here -no-start -ucrt64 -c 'cmake -S . -B cmake-build-debug-mingw-ucrt64-ninja -G Ninja -DCMAKE_BUILD_TYPE=Debug'
& 'C:\msys64\msys2_shell.cmd' -defterm -here -no-start -ucrt64 -c 'cmake --build cmake-build-debug-mingw-ucrt64-ninja'
& 'C:\msys64\msys2_shell.cmd' -defterm -here -no-start -ucrt64 -c './cmake-build-debug-mingw-ucrt64-ninja/tests/test_libvirtualhid.exe'The normal library also builds with MSVC. The Windows driver package requires the WDK/MSVC toolchain and is built separately; see Windows package.
cmake -S . -B cmake-build-debug -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build cmake-build-debug
./cmake-build-debug/tests/test_libvirtualhidLinux installed-device tests need access to /dev/uhid or /dev/uinput.
A macOS test build does not prove virtual gamepad creation; that requires a
signed broker with Apple's virtual HID entitlement. See
macOS setup.
Public declarations and changed behavior should have accurate Doxygen
comments. Markdown pages cover tasks readers perform and limits they need to
know. The documentation target uses Dockle and the sources listed in
dockle.toml:
cmake --build cmake-build-debug --target docsValidate gamepad changes against the GoogleTest lifecycle suite and adapter example. Installed driver, signing, and physical-consumer behavior require platform-specific checks.