Build PPSSPP from source

I tried to build PPSSPP on the device. I’m facing this error:

/usr/bin/ld: lib/libnative.a(SDLGLGraphicsContext.cpp.o): undefined reference to symbol 'XOpenDisplay'
//usr/lib/arm-linux-gnueabihf/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/PPSSPPSDL.dir/build.make:879: recipe for target 'PPSSPPSDL' failed
make[2]: *** [PPSSPPSDL] Error 1
CMakeFiles/Makefile2:89: recipe for target 'CMakeFiles/PPSSPPSDL.dir/all' failed
make[1]: *** [CMakeFiles/PPSSPPSDL.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Has anyone managed to build it?