Last active
March 30, 2025 22:53
-
-
Save avetharun/b42ed4df7f708651d6fa8a1f86422e2a to your computer and use it in GitHub Desktop.
Single-line vcpkg CMake definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Options of including: | |
# Inline | |
cmake_minimum_required (VERSION ...) | |
set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake CACHE STRING "VCPKG toolchain file") | |
... | |
... | |
project("...") | |
# included via external file | |
cmake_minimum_required (VERSION ...) | |
include("vcpkg.cmake") | |
... | |
... | |
project("...") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake CACHE STRING "VCPKG toolchain file") |
Comments are disabled for this gist.