1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-01 02:23:32 +02:00

Disable FAudio debug configuration in Release mode

Whereas all `SDL_assert`s will go away when compiling with optimization
flags and all plain `assert` calls (used in PhysFS) will go away when
compiling in Release mode, FAudio has a bunch of debug stuff that needs
to be explicitly disabled with its own `FAUDIO`-prefixed flag.

To do this in Release mode, we need to use generator expressions for
dumb CMake reasons. Basically, if checking the CMAKE_BUILD_TYPE variable
will not work for certain generators (Ninja, Visual Studio) because they
only specify the build type at build time, not generation/configuration
time.
This commit is contained in:
Misa 2022-08-21 15:08:19 -07:00
parent 32d41684ad
commit c4301cf4ec

View File

@ -312,6 +312,8 @@ if(BUNDLE_DEPENDENCIES)
faudio-static PRIVATE
../third_party/FAudio/include
)
# Disable FAudio debug stuff in release mode. This needs a generator expression for CMake reasons(TM)
target_compile_definitions(faudio-static PRIVATE $<$<CONFIG:Release>:FAUDIO_DISABLE_DEBUGCONFIGURATION>)
target_link_libraries(VVVVVV ${STATIC_LIBRARIES})
else()