Probably fixes this in other environments as well, or breaks it.
Move the wxWidgets_LIBRARIES paths conversion to the already existing
normalize_wx_paths() function that was using a different method that no
longer works. This converts the variable to the right format before the
tests run, fixing the Wx OpenGL test.
For the ABI checks, wrap the function pointers for the minhook
trampoline API in reinterpret_cast<LPVOID>(&fp), why this is necessary I
don't know, and it may break on other compilers. The trampoline is used
to catch message boxes opened by Wx for fatal errors.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Search for wx-config-static for static builds first, and wx-config
otherwise, before trying any config and version suffixes.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update installdeps and cmake to use windres from gcc binutils from
MINGW64 on MSYS2 CLANG64, because llvm-rc doesn't work sometimes.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use jpeg.lib instead of jpegd.lib for jpeg debug lib, it no longer has
the "d" suffix.
Fix all CMAKE_BUILD_TYPE checks for debug builds to either also check
for RelWithDebInfo or match "Debug" exactly.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Turn off ccache for vcpkg builds (this is only relevant to MSVC, where
ccache does not work yet.)
Throw an error if CMAKE_BUILD_TYPE is not valid or does not match case
exactly (to make comparisons simple.)
Add SetCompilerLinkerFlags.cmake lib with the functions:
add_compiler_flags()
For each flag passed in, add it to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS if
not already present. Also clears all build-specific flag variables on
every call, if using this functions you must set build-specific flags
yourself.
add_linker_flags()
For each flag passed in, add it to
CMAKE_(EXE|SHARED|MODULE|STATIC)_LINKER_FLAGS if not already present.
Add remove_dupes() function to VbamFunctions.cmake from:
https://stackoverflow.com/a/41416298/262458
This is used to remove duplicate flags in SetCompilerLinkerFlags.cmake
described above.
Use the new functions to set compiler and linker flags for MSVC.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>