Use code:lib_dir/1 to find correct ei dir
On my system, for some odd reason, I have several erl_interface directories in the erlang lib dir (I think it's the xbps package manager):
_andrew@system76:: ls /usr/lib/erlang/lib/erl_interface*
/usr/lib/erlang/lib/erl_interface-3.10.4:
src
/usr/lib/erlang/lib/erl_interface-3.11:
src
/usr/lib/erlang/lib/erl_interface-3.11.2:
src
/usr/lib/erlang/lib/erl_interface-3.13.1:
bin ebin include info lib src
This causes the CMake script to fail because it picks the first directory in the list.
Instead, use code:lib_dir/1 to find the active library dir