{"id":17129429,"url":"https://github.com/sergiusthebest/findwdk","last_synced_at":"2025-04-05T19:14:41.631Z","repository":{"id":43730752,"uuid":"120117033","full_name":"SergiusTheBest/FindWDK","owner":"SergiusTheBest","description":"CMake module for building drivers with Windows Development Kit (WDK)","archived":false,"fork":false,"pushed_at":"2024-09-06T19:11:21.000Z","size":51,"stargazers_count":274,"open_issues_count":9,"forks_count":57,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T18:08:00.134Z","etag":null,"topics":["cmake","cmake-module","driver","kernel-driver","kmdf","wdk","windows"],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SergiusTheBest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-03T18:14:40.000Z","updated_at":"2025-03-29T02:21:29.000Z","dependencies_parsed_at":"2023-02-14T00:46:23.005Z","dependency_job_id":"9c247fed-887b-4bcd-af83-485a75c37330","html_url":"https://github.com/SergiusTheBest/FindWDK","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergiusTheBest%2FFindWDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergiusTheBest%2FFindWDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergiusTheBest%2FFindWDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergiusTheBest%2FFindWDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SergiusTheBest","download_url":"https://codeload.github.com/SergiusTheBest/FindWDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386266,"owners_count":20930619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cmake-module","driver","kernel-driver","kmdf","wdk","windows"],"created_at":"2024-10-14T19:09:37.957Z","updated_at":"2025-04-05T19:14:41.605Z","avatar_url":"https://github.com/SergiusTheBest.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FindWDK\nCMake module for building drivers with Windows Development Kit (WDK) [![Build status](https://ci.appveyor.com/api/projects/status/o7cyircahkb6nv07/branch/master?svg=true)](https://ci.appveyor.com/project/SergiusTheBest/findwdk/branch/master) [![CI](https://github.com/SergiusTheBest/FindWDK/actions/workflows/ci.yml/badge.svg)](https://github.com/SergiusTheBest/FindWDK/actions/workflows/ci.yml)\n\n- [Introduction](#introduction)\n- [Usage](#usage)\n  - [Kernel driver](#kernel-driver)\n  - [Kernel library](#kernel-library)\n  - [Linking to WDK libraries](#linking-to-wdk-libraries)\n- [Samples](#samples)\n- [License](#license)\n- [Version history](#version-history)\n\n# Introduction\nFindWDK makes it possible to build kernel drivers and kernel libraries with Windows Development Kit (WDK) and CMake.\n\nRequirements:\n- WDK 8.0 and higher\n- Visual Studio 2015 and higher\n- CMake 3.0 and higher\n\n# Usage\nAdd FindWDK to the module search path and call `find_package`:\n\n```cmake\nlist(APPEND CMAKE_MODULE_PATH \"\u003cpath_to_FindWDK\u003e\")\nfind_package(WDK REQUIRED)\n```\n\nFindWDK will search for the latest installed Windows Development Kit (WDK) and expose commands for creating kernel drivers and kernel libraries. Also the following variables will be defined:\n- `WDK_FOUND` -- if false, do not try to use WDK\n- `WDK_ROOT` -- where WDK is installed\n- `WDK_VERSION` -- the version of the selected WDK\n- `WDK_WINVER` -- the WINVER used for kernel drivers and libraries (default value is `0x0601` and can be changed per target or globally)\n- `WDK_NTDDI_VERSION` -- the NTDDI_VERSION used for kernel drivers and libraries, if not set, the value will be automatically calculated by WINVER\n\n`WDKContentRoot` environment variable overrides the default WDK search path.\n\n## Kernel driver\nThe following command adds a kernel driver target called `\u003cname\u003e` to be built from the source files listed in the command invocation:\n\n```cmake\nwdk_add_driver(\u003cname\u003e \n    [EXCLUDE_FROM_ALL]\n    [KMDF \u003ckmdf_version\u003e]\n    [WINVER \u003cwinver_version\u003e]\n    [NTDDI_VERSION \u003cntddi_version\u003e]\n    source1 [source2 ...]\n    )\n```\n\nOptions:\n- `EXCLUDE_FROM_ALL` -- exclude from the default build target\n- `KMDF \u003ckmdf_version\u003e` -- use KMDF and set KMDF version\n- `WINVER \u003cwinver_version\u003e` -- use specific WINVER version\n- `NTDDI_VERSION \u003cntddi_version\u003e` -- use specific NTDDI_VERSION\n\nExample:\n\n```cmake\nwdk_add_driver(KmdfCppDriver \n    KMDF 1.15 \n    WINVER 0x0602\n    Main.cpp\n    )\n```\n\n## Kernel library\nThe following command adds a kernel library target called `\u003cname\u003e` to be built from the source files listed in the command invocation:\n\n```cmake\nwdk_add_library(\u003cname\u003e [STATIC | SHARED]\n    [EXCLUDE_FROM_ALL]\n    [KMDF \u003ckmdf_version\u003e]\n    [WINVER \u003cwinver_version\u003e]\n    [NTDDI_VERSION \u003cntddi_version\u003e]\n    source1 [source2 ...]\n    )\n```\n\nOptions:\n- `EXCLUDE_FROM_ALL` -- exclude from the default build target\n- `KMDF \u003ckmdf_version\u003e` -- use KMDF and set KMDF version\n- `WINVER \u003cwinver_version\u003e` -- use specific WINVER version\n- `NTDDI_VERSION \u003cntddi_version\u003e` -- use specific NTDDI_VERSION\n- `STATIC or SHARED` -- specify the type of library to be created\n\nExample:\n\n```cmake\nwdk_add_library(KmdfCppLib STATIC \n    KMDF 1.15\n    WINVER 0x0602\n    KmdfCppLib.h \n    KmdfCppLib.cpp\n    )\n```\n\n## Linking to WDK libraries\nFindWDK creates imported targets for all WDK libraries. The naming pattern is `WDK::\u003cUPPERCASED_LIBNAME\u003e`. Linking a minifilter driver to `FltMgr.lib` is shown below:\n\n```cmake\ntarget_link_libraries(MinifilterCppDriver WDK::FLTMGR)\n```\n\n# Samples\nTake a look at the [samples](samples) folder to see how WMD and KMDF drivers and libraries are built.\n\n# License\nFindWDK is licensed under the OSI-approved 3-clause BSD license. You can freely use it in your commercial or opensource software.\n\n# Version history\n\n## Version 1.0.2 (TBD)\n\n## Version 1.0.1 (13 Mar 2018)\n- New: Add ability to link to WDK libraries\n- New: Add MinifilterCppDriver sample\n- Fix: W4 warnings in C version of the driver, add missing /W4 /WX for C compiler\n\n## Version 1.0.0 (03 Feb 2018)\n- Initial public release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiusthebest%2Ffindwdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiusthebest%2Ffindwdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiusthebest%2Ffindwdk/lists"}