Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to build SPIRV-Reflect libraries only. #124

Open
alister-chowdhury opened this issue Sep 3, 2021 · 2 comments
Open

Ability to build SPIRV-Reflect libraries only. #124

alister-chowdhury opened this issue Sep 3, 2021 · 2 comments

Comments

@alister-chowdhury
Copy link
Contributor

Hi there,

It would be really convenient if it was possible to build SPIRV reflect as a static or shared library so multiple things could link against it at the same time without having to deal with symbol conflicts.

Additionally, it would be useful to be able to configure the CMakeLists to only build said library and optionally turn off the main executable and stripper util.

If this is something you're happy for me to do, it probably shouldn't be a massive hassle.

Many thanks,
Alister

@chaoticbob
Copy link
Contributor

Thanks for the Feature Request. I will get to this as soon as I can.

chaoticbob referenced this issue Jan 30, 2022
- SPIRV_REFLECT_EXECUTABLE toggles building of spirv-reflect
  executable. Default is ON.
- SPIRV_REFLECT_EXAMPLES toggles building of examples. Default is ON.
- SPIRV_REFLECT_STRIPPER toggles building of stripper util. Default is
  OFF.
- SPIRV_REFLECT_sTATIC_LIB togges building of spirv-reflect as a static
  library. Default is OFF. (Added in previous commit)
@chaoticbob
Copy link
Contributor

I added some build options to toggle building of the various targets in 05b6ec3.

I was only able to add a build target for a static library. The shared library is going to take some amount of non-trivial work to get all the export declarations in place. I'll have to find a larger chunk of time for that.

To build only the static library, add these CMake command line arguments:
-DSPIRV_REFLECT_STATIC_LIB=1 -DSPIRV_REFLECT_EXECUTABLE=0 -DSPIRV_REFLECT_EXAMPLES=0 -DSPIRV_REFLECT_STRIPPER=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants