Comments (7)
@atteneder I'm mostly interested in the command-line utility, so my preferred way would be either a binary release from GH, or building my own via CMake - preferably with as little third-party dependency setup and using as straightforward of a config as possible, e.g. cmake & cmake --build from root.
from ktx-software.
After generating the make files with CMake you can run
make toktx
to build toktx
. Similarly
make libktx.gl
will build the loading library though, as it will be built as a dependency of toktx
, this should be unnecessary.
Neither libktx
and toktx
will trip over those dependencies. Only the vkloadtests
target depends on vulkan/vulkan.h
and the VulkanSDK. Only the various documentation targets depend on doxygen. There is nothing I can do about these dependencies.
I'm not sure what I can do to make this easier. Is there a way to tell CMake to make the default target something other than all
? If there is, I suppose the answer is to create a pseudo target that builds libktx.gl
, ktx2check
, ktx2ktx2
ktxinfo
, ktxsc
and toktx
. All these build without those dependencies.
Did you read BUILDING.md? If so was it help or hindrance? Looking at it, now I see it only explains how to do partial builds for the build/make/linux
files. I can certainly add similar info for the CMake option. I can also add a note about the build/make/linux
files needing gyp. As I have gyp installed, I hadn't noticed that. I'm sorry.
Feel free to submit a PR with improvements to BUILDING.md.
I'm open to any other suggestions or PRs you have for improvement.
from ktx-software.
From CMake-generated projects, doing make toktx
still requires Vulkan headers from what it looks like:
[ 0%] Building C object CMakeFiles/libktx_gl.dir/mnt/c/work/KTX-Software/lib/texture1_vvtbl.o
In file included from /mnt/c/work/KTX-Software/lib/texture1_vvtbl.c:33:
/mnt/c/work/KTX-Software/lib/vk_funcs.h:39:10: fatal error: vulkan/vulkan.h: No such file or directory
39 | #include <vulkan/vulkan.h>
| ^~~~~~~~~~~~~~~~~
With CMake, the way I've seen other projects structured is that optional dependencies (tests, documentation) are behind separate configuration switches (BUILD_DOCS, BUILD_TESTS, etc.). It's also possible in theory to detect the presence of tools like Doxygen during CMake install - I've seen many projects use this but I've also seen package manager maintainers advise against that so I'm not sure if this is considered a good practice...
I did read BUILDING.md
- it didn't really help but it wasn't a hindrance in that the build instructions for Linux are ones that I intuitively expected after doing ls build
.
from ktx-software.
After installing libvulkan-dev and libgl1-mesa-dev to get Vulkan SDK and libGL.so toktx did build successfully. It seems odd to me that a command-line texture conversion tool requires Vulkan SDK and OpenGL to build - would you be open to accepting changes that remove these dependencies?
from ktx-software.
First let me apologize for misremembering. As you found, building libktx
requires vulkan/vulkan.h
. This is for compiling the API to the Vulkan loader. It does not require any other parts of the Vulkan SDK. libgl.so
is required by libktx
because it is a DLL and is not run-time retrieving the GL function addresses. That is something I want to fix.
would you be open to accepting changes that remove these dependencies?
Absolutely. I'm not sure it is practical to remove the vulkan/vulkan.h
dependency as the loader API uses several Vulkan types and structures whose definitions would have to be duplicated within ktxvulkan.h
likely leading to problems for app's using the Vulkan loader and including vulkan/vulkan.h
for their use of Vulkan.
from ktx-software.
I'm going to close this for now in favor of #134, it doesn't make too much sense to work on build config with that in the works.
from ktx-software.
Hi @zeux,
I'm working on an easy to use CMake config and would value your input. What would be your preferred way and why:
- Use a pre-built library installed via Installer or packaging system (homebrew, apt, choco, ...)
- Build your own locally (via Makefiles/CMake) and copy results
- Integrate CMake target into your project's CMake config
- Some other way?
I think first variant + a FindKTX CMake module would be most convenient and second and third variants let you customize the build.
Thanks in advance,
Andi
from ktx-software.
Related Issues (20)
- createDFDPackedPadded creates DFD with bits and padding in the wrong order
- Support R16G16_S10_5_NV format
- Allow A8B8G8R8 PACK32 formats
- Loading KTX1 and KTX2 file on Linux/OpenGL 4.3 leads to weird error if not luch the program with sudo HOT 4
- Project install installs fmt lib HOT 1
- Preceding `ktx` command name with option leads to error HOT 1
- WebGL test gets shader compile error
- Converting transfer functions (using assign-oetf and convert-oetf) HOT 15
- samplePositions possibly incorrect for single-plane 4:2:2 YUV formats HOT 4
- The JNI binding for input swizzling is broken
- No option to apply `zstd`/`zlib` compression via JNI HOT 21
- Improvements for the Java/JNI bindings HOT 4
- Synchronizing auto-generated files with bindings HOT 2
- How to call `CreateFromMemory`? HOT 2
- Memoy leak when ktxTexture2_DeflateZstd fails
- Running in docker container (GLIBC not found error) HOT 2
- CI build scripts prevent local use with test updates by initializing CTS submodule
- Skipping mipmaps when loading from disk HOT 2
- The execution speed of the ktxTexture2_CompressBasisEx method is quite slow HOT 15
- No definition for ktxTexture2_Destroy in ktx.h HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ktx-software.