How do I integrate building (just) libktx(_read) into my own software? #995
-
|
Hi, I don't think I can disable all the things I don't want in CMake, for example, I don't want an ASTC encoder, and I don't think I need an ASTC decoder either[1] - but as far as I can tell CMake only offers the ASTENC_DECOMPRESSOR option to "enable astenc builds for decompression only", I didn't see an option to disable astenc entirely. and several additional similar errors. This isn't really documented much as far as I can tell, but it seems like it even builds two libs: libktx.a and libktx_read.a (and also libobjUtil.a and libobj_basisu_cbind.a whatever those are for). I think it may be useful to have documentation explicitly on this usecase, which probably is most common for potential libktx users: Games need exactly this functionality, and so do texture/image viewers and similar software (I'm currently writing a texture viewer). It might also be helpful if lib/ had its own CMakeLists.txt just for building the lib (explicitly allowing to build only libktx or libktx_read), so it's
[1] and if I did, I'd probably try to integrate Androids decoder, like Basis Universal does, because it's just one source and one header file instead of.. all that stuff in external/astc-encoder. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
|
I also just noticed that (This isn't too relevant to my usecase, but probably for others that actually want to use libktx to encode or decode ASTC) |
Beta Was this translation helpful? Give feedback.
-
|
With some guessing and trial and error I integrated what's needed to build libktx_read, including a stripped-down CMakeLists.txt to build it: Would still be good to have some official way to do this to make updating to new libktx versions (that may require additional source files) easier. |
Beta Was this translation helpful? Give feedback.
-
|
@DanielGibson, Have the PRs you submitted, PR #998 and PR #1012, helped the situation w.r.t configuring and building just libktx or libktx_read? |
Beta Was this translation helpful? Give feedback.
As of PR #1071 there is a CMake project for building just libktx.