The CMake logic seems broken. Luckily it's easy to work around. Signed-off-by: Rosen Penev <rosenp@gmail.com>