NVIDIA / Q2RTX

NVIDIA’s implementation of RTX ray-tracing in Quake II
Other
1.21k stars 181 forks source link

[Feature Request] Support compilation against shared system libs #306

Open runlevel5 opened 1 year ago

runlevel5 commented 1 year ago

I could tell that Q2RTX has a list of bundled external dependencies residing in ./extern. Most of them are packaged and support by Ubuntu and Fedora. I would like to propose to add USE_SYSTEM_<LIB_NAME> flags in CMakeList to toggle optional compilation against the system libs.

### Tasks
- [x] cURL
- [x] stb
- [x] openAL
- [x] zLib
- [x] SDL2
- [ ] Vulkan-Headers
- [ ] glslang
- [ ] tinyobjloader-c
Connor-GH commented 1 year ago

I was actually just about to open a similar issue. Currently, on gentoo (with normal glibc), there exists a bug where compilation fails because of a zlib OF macro (https://bugs.gentoo.org/show_bug.cgi?id=383179). This prevents the zlib library from building, and as a result also prevents Q2RTX from building. If the system library had been used, the gentoo maintainers' fix would have already been used to let the library build, and Q2RTX could just use that.

(by the way, the fix for gentoo systems compiling zlib is to specify -DOF\(x\)=x at the command line.)

There also used to exist a bug where the Q2RTX-provided SDL2 did not allow proper linking with wlroots-based display servers.

runlevel5 commented 12 months ago

If the core team is okay with this feature request, I could provide patches