Part of #2137 (closed). I removed part of the CMakeLists.txt patch because the patched part is now gone.
CMakeLists.txt