Yep, don’t do that. Either set the environment variable by running cmake with the command line example I showed you, where the variable is set in the same line as you call it, or set the environment variable globally in your development environment before you call cmake.
Offhand I didn’t, but after searching a bit, libm is for math functions.
chocolate-doom’s CMakeLists.txt has a
find_package(m) line, and there is a Findm.cmake in the cmake directory.
> # Finds libm, so we can link against it for math functions. If libm doesn't
> # exist, linking against the m target will have no effect.
I would set that to be required as well, and see if it isn’t finding it. Maybe you need to download or install libm on your system?
But looking closer at that error message, that’s not coming from chocolate-doom’s CMakeLists.txt files. It’s from SDL2’s CMakeLists.txt, which is trying to export SDL2Targets.
The SDL2 CMakeLists.txt does check for libm and requires it.
So yeah, I think you might need to ensure libm is on your system to build. I don’t know if it is having trouble because you are trying to build for Android. libm is part of the Android NDK, so you might need to make sure that you are able to find that directory, too?