Skip to content

Support vcpkg #37

Description

@johnpatek

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:

  1. Build megamime as an overlay port
  2. Find mio, argparse, sqlite, etc. using vcpkg.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions