How to link library with suffix d for debug?

How did you get such a setup? The CMake files should never be under a config-specific location unless you specified that manually. If you want a single install prefix with both, you’ll need a single CMake package directory which knows about both.