I write a library that is built with Visual Studio (msbuild).
I distribute binaries only of the library via vcpkg (I use a private vcpkg registry. The portfile.cmake
for the port simply downloads a zip file of the binaries and headers and places them in the vcpkg install tree).
I have a client that is using CMake.
I can integrate vcpkg (manifest mode) into CMake and find_package() finds vcpkg ports except for mine.
I've arrived at the point that I think I need to distribute either a CMake config (<my-package>-config.cmake
) or a CMake find module (Find<my-package>.cmake
).
All of the books I've read for CMake seem to assume that you can easily export your CMake targets to create a CMake config. Since I don't build my library with CMake I'm not sure how to get a Targets.cmake.
The documentation I'm reading on CMake find modules begins discussing resolving dependencies using CMakeFindDependencyMacro
and find_dependency()
but vcpkg also manages dependencies (this was the whole reason I distributed my library via vcpkg).
What's the solution here; CMake config or find module?
How does one write either if the project is not built with CMake?