Linking failed in Ubuntu 12.04.
/usr/bin/ld: error: cannot find -lglfw3
But
dmitryshm@redtwo:~/work/PabkJS$ whereis libglfw3.a
libglfw3: /usr/local/lib/libglfw3.a
tells that it’s installed. And
dmitryshm@redtwo:~/work/PabkJS$ cat /usr/local/lib/pkgconfig/glfw3.pc
prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: GLFW
Description: A multi-platform library for OpenGL, window and input
Version: 3.1.1
URL: http://www.glfw.org/
Requires.private: x11 xrandr xinerama xi xxf86vm xcursor gl
Libs: -L${libdir} -lglfw3
Libs.private: -lrt -lm
Cflags: -I${includedir}
tells us that pkgconfig can work with it. So there’s something wrong in cmake files for Linux. As far as I know they’re wrong for cocos2d-js 3.5, 3.6 and 3.6.1.