Try to set the architecture correctly when compiling for Intel on ARM64
Macs, this also sets the zip name correctly for our releases.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix re-installing binary packages on next cached run by clearing the
cache entries for `vcpkg list`. Also remove the binary packages
directory after installing.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Set the CMake cache variables for `vcpkg list` in `CACHE` instead of
`PARENT_SCOPE`, because the parent scope is now a transient function and
nothing was being cached, causing very slow run speed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Keep a list of already installed dependencies and use the count to
determine if any are not installed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Followup on 357eccc6 (build: fix checking if bin pkg host deps
installed, 2025-07-13) keep a count of already installed host deps, and
when the host deps count is equal to it rather than zero, break out of
the loop. This fixes the infinite loop and hang caused by host deps
being required but already being installed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix the check for host dependency packages being downloaded to not run
if the package is already installed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Don't set the compilers to `gcc` for MinGW vcpkg triplets, because it
may be CLANG64 with MinGW.
Link FAudio using the `-static` target or the normal target only.
Use `ghc::filesystem::path::c_str()` to pass paths to `std::fstream` as
there is a conversion problem with this toolchain.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Before installing calculated host dependencies for binary packages,
check if they are already installed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove our copy of FindFFmpeg.cmake, as this module is included in
distributions now.
This also fixes the problem with finding x264 and x265 components and
libraries for FFmpeg.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add CMake option VCPKG_BINARY_PACKAGES, defaulting to TRUE to download
and use binary packages for vcpkg dependencies.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use the `vcpkg-binpkg-prototype` `vcpkg-list` implementation and never
`vcpkg list`, because the letter sometimes shortens package names and
may be breaking the package installed check.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Calculate and install only build dependencies for a binary package set
instead of everything from the host triplet. This way we can support
binary packages for dynamic builds as well.
Also check that the vcpkg Git clone is writable if it does not exist.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Always use a parallel vcpkg directory instead of the Visual Studio
default vcpkg, because installing there requires elevation and doesn't
always work.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a patch to our build of wxWidgets for macOS to fix the alert sound
bug, as described here:
https://github.com/wxWidgets/wxWidgets/issues/25262#issuecomment-2745905462
. Add a macro to disable our workaround for this bug when a CMake option
indicating that this patch was applied is `TRUE`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add the CMake option `ENABLE_OPENAL` which defaults to `ON` except for
32 bit Windows builds, because OpenAL-Soft uses `avrt.dll` which is not
available on Windows XP.
Update README.md.
Fix linking `libsamplerate` for the `x86-mingw-static` triplet which we
use for 32 bit Windows XP builds.
Make some minor fixes to SDL3 detection and SDL2 fallback.
Clean up the audio API selection code paths.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix x86 32 bit build for Windows XP.
Set the `WINVER` and `_WIN32_WINNT` macros to the value for Windows XP.
Disable XAudio for these builds.
Add the missing `inet_pton()` and `inet_ntop()` functions for SFML.
Fix a FetchContent warning in the CMake as well.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Default `ENABLE_SDL3` to whether `find_package(SDL3)` can find it.
Only add libsamplerate for SDL2 with vcpkg.
Install gettext tools on Windows if they are not available, not just
under MSVC. This makes the `x86-mingw-static` triplet work as well.
Fix syntax error.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Implement SDL3 for the SDL port if the CMake definition ENABLE_SDL3 is
set.
Implement setting the color depth for both wxWidgets and the SDL port.
Fix the coloring issues in the SDL port for OpenGL.
Implement 8 bit color support.
Update and fix the wx port SDL sound driver.
Implement SDL video in the wx port.
Silence GL deprecations on macOS.
Add SDL renderer selection.
Fix filter for bit depths other than 32 bit.
Fix GDK backend for Linux.
Add Metal renderer for macOS.
Fix Quartz drawing.
Change two `constexpr` declarations to `inline` to fix a link error on
MSVC.
Also remove the C++14 override that was used for testing on MSVC, the
project being defined as C++17 in CMake.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Convert the C++17 code in the bundled SFML code to C++14 to hopefully
allow for targeting macOS 10.10 (Yosemite) instead of 10.15 (Catalina.)
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove the SFML external dependency, include the SFML 3.0.1 system and
network libraries in third_party and adjust the build code, tools and
documentation accordingly.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make some adjustments to the Mac build scripts to support building an
ARM64 binary for Apple Silicon.
Also support cross-compiling for Intel on Apple Silicon.
Also prefer using Ninja for CMake ports.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use capitalized `ARM` instead of `arm` for ARCH_NAME in
Architecture.cmake so that the Mac Apple Silicon zip releases are
suffixed `ARM64` not `arm64`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use `-O3 -ffast-math` instead of `-Ofast`, which is deprecated by the
latest clang. In both our options and for libretro.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>