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