I put cmake on debug mode, so it showed me the line where the error occurred:
/usr/lib64/ccache/gcc CMakeFiles/wargus.dir/wargus.c.o -o wargus -rdynamic -lfreetype -lglib-2.0 -lgobject-2.0 -lgdk_pixbuf-2.0 -lgdk-x11-2.0 -lgtk-x11-2.0 -lcairo -lpango-1.0 -latk-1.0
Adding -lX11 solved the issue:
/usr/lib64/ccache/gcc CMakeFiles/wargus.dir/wargus.c.o -o wargus -rdynamic -lfreetype -lglib-2.0 -lgobject-2.0 -lgdk_pixbuf-2.0 -lgdk-x11-2.0 -lgtk-x11-2.0 -lcairo -lpango-1.0 -latk-1.0 -lX11
I put cmake on debug mode, so it showed me the line where the error occurred:
/usr/lib64/ ccache/ gcc CMakeFiles/ wargus. dir/wargus. c.o -o wargus -rdynamic -lfreetype -lglib-2.0 -lgobject-2.0 -lgdk_pixbuf-2.0 -lgdk-x11-2.0 -lgtk-x11-2.0 -lcairo -lpango-1.0 -latk-1.0
Adding -lX11 solved the issue:
/usr/lib64/ ccache/ gcc CMakeFiles/ wargus. dir/wargus. c.o -o wargus -rdynamic -lfreetype -lglib-2.0 -lgobject-2.0 -lgdk_pixbuf-2.0 -lgdk-x11-2.0 -lgtk-x11-2.0 -lcairo -lpango-1.0 -latk-1.0 -lX11