diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index 4bb4286683..7a1b2777bd 100644
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -123,6 +123,8 @@ fetchTool()
os="linux"
elif [ "$UNAME" = "Darwin" ]; then
os="osx"
+ elif [ "$UNAME" = "FreeBSD" ]; then
+ os="freebsd"
else
echo "Unknown uname: $UNAME"
return 1
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake
index 617fe1a0ff..cf3fc7861c 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -170,6 +170,8 @@ function(vcpkg_configure_cmake)
list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/android.cmake")
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/osx.cmake")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/freebsd.cmake")
endif()
list(APPEND _csc_OPTIONS
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index b6cfc4aab0..0c3a9bca26 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -123,6 +123,8 @@ function(vcpkg_find_acquire_program VAR)
set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}")
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-osx")
+ elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
+ set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-freebsd")
else()
set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-linux")
endif()
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml
index 9378c78325..18ca741c2d 100644
--- a/scripts/vcpkgTools.xml
+++ b/scripts/vcpkgTools.xml
@@ -21,6 +21,13 @@
ee9eded0c72e06ef99554f09553d40842478700ca6f07319c28247f1d45301708c703c65ad617cf618833257bacc3b9f63a54b32288bfb619d38758669dcd20f
cmake-3.12.4-Linux-x86_64.tar.gz
+
+ 3.12.4
+ cmake-3.12.4-FreeBSD-x86_64/bin/cmake
+ https://github.com/ivysnow/CMake/releases/download/v3.12.4/cmake-3.12.4-FreeBSD-x86_64.tar.gz
+ b5aeb2de36f3c29757c9404e33756da88580ddfa07f29079c7f275ae0d6d018fdfe3f55d54d1403f38e359865cf93436e084c6b1ea91f26c88bc01dde3793479
+ cmake-3.12.4-FreeBSD-x86_64.tar.gz
+
2.20.0
cmd\git.exe
@@ -40,6 +47,12 @@
+
+ 2.7.4
+
+
+
+
2.4.1
vswhere.exe
@@ -94,4 +107,11 @@
acadfb286eb7d93676629701917fa0c3c39f36daa068c169e4a098c29f97380d1ea95abfd42b04798ff118fd9dc93fdb250fcda36086bac20bc5506354214fc3
ninja-mac-1.8.2.zip
+
+ 1.8.2
+ ninja
+ https://github.com/ivysnow/ninja/releases/download/v1.8.2/ninja-freebsd.zip
+ 56a55ae9a6b5dfad4f28f9fe9b8114f1475c999d2f07fff7efa7375f987e74b498e9b63c41fc6c577756f15f3a1459c6d5d367902de3bedebdf9a9fd49089a86
+ ninja-freebsd-1.8.2.zip
+
diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp
index 2a73dba899..c34f309745 100644
--- a/toolsrc/src/vcpkg/metrics.cpp
+++ b/toolsrc/src/vcpkg/metrics.cpp
@@ -220,6 +220,8 @@ namespace vcpkg::Metrics
"OSX",
#elif defined(__linux__)
"Linux",
+#elif defined(__FreeBSD__)
+ "FreeBSD",
#elif defined(__unix__)
"Unix",
#else
diff --git a/toolsrc/src/vcpkg/tools.cpp b/toolsrc/src/vcpkg/tools.cpp
index 365271872d..b713b27526 100644
--- a/toolsrc/src/vcpkg/tools.cpp
+++ b/toolsrc/src/vcpkg/tools.cpp
@@ -52,11 +52,13 @@ namespace vcpkg
static constexpr StringLiteral OS_STRING = "osx";
#elif defined(__linux__)
static constexpr StringLiteral OS_STRING = "linux";
+#elif defined(__FreeBSD__)
+ static constexpr StringLiteral OS_STRING = "freebsd";
#else
return std::string("operating system is unknown");
#endif
-#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
+#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__)
static const std::string XML_VERSION = "2";
static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml";
static const std::regex XML_VERSION_REGEX {R"###()###"};