1

I want to port one my library to Microsoft's vcpkg. This library is header-only. I created portfile.cmake, everything is fine. But vcpkg install <mylibname> builds release and debug. I have to say, that this build process is for internal for library generator of C++ code. So I want to have build only in release mode. How can I make it?

This was the first question. And from it the second one is coming. This generator places in bin folder and I have an error like

There should be no bin\ directory in a static build...

How can I enable to have bin directory with generator for header-only library in vcpkg?

I opened an issue in vcpkg's repository here

Igor Mironchik
  • 582
  • 4
  • 17

1 Answers1

2

Thanks to guys from vcpkg team. They answered on my questions.

To disable debug build in port file is needed to be added:

set(VCPKG_BUILD_TYPE release)

And there should not be bin directory, but in my case tools/${PORT} with executable should be. And vcpkg_copy_tools() is exactly for it.

Igor Mironchik
  • 582
  • 4
  • 17