How to link release and debug version of libtorch library with CMake?

I have the same issue. Did you find a solution eventually?