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>
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>
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>
Some Linux distributions use a hermetic build environment to build. This
resulted in issues with `FetchContent` attempting to download googletest
at configure time.
This fixes the issue by integrating googletest as a git submodule
instead of downloading it at configure time.
* Convert the only existing test (strutils) to googletest.
* Create a test target for vbam-wx-config.
* Add necessary fakes for the test binary.
* Add tests to CI.
* Create multiple components library. These depend on the core code and
are used by multiple frontends.
* Clean up the filters declaration by moving them to a common header in
`components/filters/filters.h`.
* Clean up the include guards and include orders.
* Fix the modified paths in `src/debian/copyright` to match their new
location.
Update doctest.h because the old version causes build failures on Linux.
Also move it from third_party/include/doctest to third_party/include.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Switch usage of std::optional to nonstd::optional for now because of an
error from the Mac builder script, I cannot reproduce the problem yet
but will try to fix it later, it may not be fixable when targeting 10.7.
The header is from:
https://github.com/martinmoene/optional-lite
.
Usage is about the same, to include:
`#include "nonstd/optional.hpp"`
Then use nonstd::optional and nonstd::nullopt instead of the std::
counterparts.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add the Catch2 headers to third_party/include/catch2.
Add Catch.cmake and CatchAddTests.cmake to cmake/.
Add unit tests src/wx/tests/strutils.cpp using Catch2 to test
src/wx/strutils.cpp.
Make some code changes to strutils.cpp to make the tests pass.
See src/wx/tests/CMakeLists.txt for how to set up unit test files; they
plug into the normal CTest mechanism in cmake.
The test binaries are written to the tests/ subdirectory of the build
directory.
Building the tests and enabling the CTest support can be turned off by
passing -DBUILD_TESTING=OFF to cmake, the default is ON, this is the
standard mechanism.
Start running ctest on travis and appveyor.
Move stb to third_party/include where Catch2 is now as well.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>