With the help from @cocobean I managed to make it work, in a slightly tricky way.
When I compile with the following commands:
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
It generates an executable that works, even without modifying CMakeLists.txt or adding the line:
target_link_libraries(moonlight network)
I imagine that internally CMake is doing a different linking when adding the Release flag. Although this is a temporary “solution”, I do not think it is the most appropriate, nor the final solution
If I compile with the Debug flag it stops working, or if I don’t specify any flag it doesn’t work either, I don’t know what to modify in the CMakeLists.txt so that it works in all scenarios ![]()

