Vcpkg repro steps for microsoft/vcpkg#31962

Seems to be related to the system-utils library.

Project layout

.
├── CMakeLists.txt
├── CMakePresets.json
├── README.md
├── cmake
│   ├── CompilerWarnings.cmake
│   ├── Sanitizers.cmake
│   ├── ranges.cmake
│   ├── toolchain.cmake
│   └── vcpkg.cmake
├── lib
│   ├── CMakeLists.txt
│   ├── Position.cpp
│   └── include
│       └── Position.hpp
├── src
│   ├── CMakeLists.txt
│   └── main.cpp
├── system-utils
│   ├── CMakeLists.txt
│   ├── Scaling.cpp
│   ├── Scaling.hpp
│   ├── Scaling.mm
│   ├── User.hpp
│   ├── UserPosix.cpp
│   └── UserWin32.cpp
├── test
│   ├── CMakeLists.txt
│   ├── README.md
│   └── unit_tests
│       └── testPosition.cpp
└── vcpkg.json

Ubuntu 22.04

Get deps

pip3 install wheel setuptools
pip3 install ninja --upgrade
sudo apt-get update && sudo apt-get install -y curl zip unzip tar libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libudev-dev clang-12 make ninja-build cmake autoconf libtool mesa-common-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev

Clean up previous build

rm -rf build

CMake configure first time: WILL FAIL

cmake --preset linux-gcc-11 -DCMAKE_BUILD_TYPE=Debug
ERROR

CMake Error at build/linux-gcc-11/vcpkg_installed/x64-linux/share/sfml/SFMLConfig.cmake:144 (message):
SFML found but some of its dependencies are missing ( OpenGL FreeType)
Call Stack (most recent call first):
build/linux-gcc-11/_deps/vcpkg-src/scripts/buildsystems/vcpkg.cmake:852 (_find_package)
lib/CMakeLists.txt:1 (find_package)


CMake Error at build/linux-gcc-11/_deps/vcpkg-src/scripts/buildsystems/vcpkg.cmake:852 (_find_package):
Found package configuration file:

    /mnt/c/Users/patricia/Code/vcpkg-repro/build/linux-gcc-11/vcpkg_installed/x64-linux/share/sfml/SFMLConfig.cmake

but it set SFML_FOUND to FALSE so package "SFML" is considered to be NOT
FOUND.
Call Stack (most recent call first):
lib/CMakeLists.txt:1 (find_package)


-- Configuring incomplete, errors occurred!
See also "/mnt/c/Users/patricia/Code/vcpkg-repro/build/linux-gcc-11/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/Users/patricia/Code/vcpkg-repro/build/linux-gcc-11/CMakeFiles/CMakeError.log".

CMake configure second time: WILL PASS

cmake --preset linux-gcc-11 -DCMAKE_BUILD_TYPE=Debug

CMake Build

cmake --build --preset linux-gcc-build-11 --config Debug

CMake Run tests

ctest --preset linux-gcc-test-11 -C Debug

MacOS

Clean up previous build

rm -rf build

CMake configure first time: WILL FAIL

cmake --preset osx -DCMAKE_BUILD_TYPE=Debug
-- Found SFML 2.5.1 in /Users/patricia-gallardo/Code/vcpkg-repro/build/osx/vcpkg_installed/x64-osx/share/sfml
CMake Error at build/osx/vcpkg_installed/x64-osx/share/sfml/SFMLConfig.cmake:144 (message):
  SFML found but some of its dependencies are missing ( OpenGL FreeType)
Call Stack (most recent call first):
  build/osx/_deps/vcpkg-src/scripts/buildsystems/vcpkg.cmake:852 (_find_package)
  lib/CMakeLists.txt:1 (find_package)


CMake Error at build/osx/_deps/vcpkg-src/scripts/buildsystems/vcpkg.cmake:852 (_find_package):
  Found package configuration file:

    /Users/patricia-gallardo/Code/vcpkg-repro/build/osx/vcpkg_installed/x64-osx/share/sfml/SFMLConfig.cmake

  but it set SFML_FOUND to FALSE so package "SFML" is considered to be NOT
  FOUND.
Call Stack (most recent call first):
  lib/CMakeLists.txt:1 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/patricia-gallardo/Code/vcpkg-repro/build/osx/CMakeFiles/CMakeOutput.log".
See also "/Users/patricia-gallardo/Code/vcpkg-repro/build/osx/CMakeFiles/CMakeError.log".

CMake configure second time: WILL PASS

cmake --preset osx -DCMAKE_BUILD_TYPE=Debug

CMake Build

cmake --build --preset osx-build --config Debug

CMake Run tests

ctest --preset osx-test -C Debug