Tribol
Tribol copied to clipboard
Define a `TRIBOL_USE_REDECOMP` to use in source
Use TRIBOL_USE_REDECOMP in source instead of BUILD_REDECOMP to match the style used with other #ifdefs
At this time, Tribol fails to build because BUILD_REDECOMP is undefined at the time TribolConfig.cmake is generating the config.hpp file.
The variable BUILD_REDECOMP is set in src/CMakeLists.txt file, and in CMake the variables have a directory scope, therefore it is still undefined in the parent scope.
As a temporary workaround, I added the option in cmake/Options.cmake and it fixes the issue.
option(TRIBOL_USE_REDECOMP "Enable redecomp" ON)
set(BUILD_REDECOMP ${TRIBOL_USE_REDECOMP})
But why is this an option in the first place, if the library does not build without it? Maybe it should be a mandatary dependency?