On macOS, I'm getting the following error:
CMake Error at src/runtime/plugins/CMakeLists.txt:1 (if): if given arguments: "AND" "AND" Unknown arguments specified
The reason is the double expansion of arguments in CMake, so instead of if (${FOO}) one should write if(FOO).
This patch fixes the build.