Conversation
theoparis
commented
Jul 26, 2025
- Allow building shared libraries with -DBUILD_SHARED_LIBS=ON
- Add cmake install target
|
@theoparis Hey, that actually seems like a good PR, you wanna reopen this? |
- Allow building shared libraries with -DBUILD_SHARED_LIBS=ON - Add cmake install target
f5b4d7c to
1bf771f
Compare
|
At first I had issues with the bundling of objects. It seems to work fine with just linking against tint_c_api with |
|
Segfaulting when compiling wgsl without support for it is on me, that needs to be gracefully handled in wgpuCreateShaderModule. |
| # they will now correctly inherit all necessary compile definitions. | ||
| target_link_libraries(glfw_surface PUBLIC wgvk glfw) | ||
| target_link_libraries(basic_wgsl_shader PUBLIC wgvk glfw) | ||
| target_link_libraries(basic_wgsl_shader PUBLIC wgvk glfw m) |
There was a problem hiding this comment.
This will break windows, it has no libm.
There was a problem hiding this comment.
Oh, good point. Is this PR needed now that 4258744 exists though? I get
/home/theo/src/WGVK/src/glslang_c_api.cpp:80:(.text+0x1f8): dangerous relocation: unsupported relocation
/usr/bin/ld: CMakeFiles/glslang_c_api.dir/src/glslang_c_api.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN7glslang7TShader14ForbidIncluderE' which may bind externally can not be used when making a shared object; recompile with -fPIC
Using BUILD_SHARED_LIBS with the latest commit 👀 Additionally disabling the examples breaks BUILD_SHARED_LIBS
There was a problem hiding this comment.
Oh yeah, this PR isn't needed, sorry.
But the commit you mentioned still has that problem. I guess we don't test building the examples in CI yet and that's why it's not caught.
11077af to
1148288
Compare
703b43a to
5d0649f
Compare