working but still a little bit hacky cmake configuration to build d shared library