You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds the `WIL` CMake interface library, which allows the
project to be exported and installed for consumption by other CMake
projects in the standard fashion.
The logic to create the NuGet package has been replaced with the
built-in CPack NuGet support introduced with CMake 3.13, which
automatically packages any files and directories installed by the
target. This replaces the `make_wil_nupkg` custom target with the
standard CPack `package` target, which builds the package with all the
configured package generators (for now that's just NuGet).
Note that the original NuGet specification file used the new license
style, whereas CPack still generates a NuGet specification with the
deprecated style. This will hopefully be resolved by future versions of
CPack.
Resolves#118.
Note that even though WIL is a header-only library, you still need to install the package for all architectures/platforms you wish to use it with. Otherwise, WIL won't be added to the include path for the missing architectures/platforms. Execute `vcpkg help triplet` for a list of available options.
49
49
50
+
## Consuming WIL via CMake
51
+
52
+
WIL exports and installs a CMake target for use in other CMake projects. You can link your target to WIL with the following:
53
+
54
+
```cmake
55
+
find_package(WIL)
56
+
57
+
add_library(MyCMakeTarget PUBLIC WIL)
58
+
```
59
+
60
+
If CMake is unable to locate WIL automatically, you can configure `WIL_DIR` to ensure it is found:
These instructions can be combined with the package manager instructions above to consume a stable version of WIL from a CMake project.
67
+
50
68
# Building/Testing
51
69
To get started testing WIL, first make sure that you have a recent version of [Visual Studio](https://visualstudio.microsoft.com/downloads/) and the most recent [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) installed. If you are doing
52
70
any non-trivial work, also be sure to have a recent version of [Clang](http://releases.llvm.org/download.html) installed. Once everything is installed, open a VS
0 commit comments