I see. Thanks for your answer. I actually ended up not using libktx and writing my own small KTX reader – the format is beautifully simple to deal with, especially if you know exactly what hardware you’ll be running on. It also allowed me to integrate it more naturally with the rest of the engine.
I stumbled upon another problem, by the way, just in case it helps someone:
When built with make on linux, the generated static library (libktx.es1.a) contains folders, which makes the linker refuse to use it (Malformed archive). This can be fixed by unpacking it with ar and then packing it without folders. I tried to figure out what’s wrong in the build scripts but I am very unfamiliar with all the technologies involved (make, cmake, gyp, bash) so I gave up, sorry.