I want this repo to support building using vcpkg the cmake system can detect if it's vcpkg using the following code:
# Check if CMAKE_TOOLCHAIN_FILE is set
if (DEFINED CMAKE_TOOLCHAIN_FILE)
message(STATUS "CMAKE_TOOLCHAIN_FILE is set to: ${CMAKE_TOOLCHAIN_FILE}")
# Check if the path points to the vcpkg toolchain file
if ("${CMAKE_TOOLCHAIN_FILE}" MATCHES ".*[/\\\\]scripts[/\\\\]buildsystems[/\\\\]vcpkg.cmake$")
message(STATUS "vcpkg toolchain file detected via path matching.")
set(VCPKG_TOOLCHAIN_ACTIVE TRUE)
endif()
endif()
And if it is not, proceed with old FetchContent approach. Otherwise, we should:
- Build megamime as an overlay port
- Find mio, argparse, sqlite, etc. using vcpkg.
I want this repo to support building using
vcpkgthe cmake system can detect if it's vcpkg using the following code:And if it is not, proceed with old
FetchContentapproach. Otherwise, we should: