ebiggers / libdeflate

Heavily optimized library for DEFLATE/zlib/gzip compression and decompression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POSITION_INDEPENDENT_CODE ON for static compilations

sanguinariojoe opened this issue · comments

You really want to add that option here. Otherwise static linking inside dynamic libraries would be impossible (like it is usually the case when making Python wheels)

You can already set -DCMAKE_POSITION_INDEPENDENT_CODE=1 when running cmake, if you want to. Is there a strong reason you want libdeflate to force it on for the static library, overriding the cmake default behavior?

Hey! Sorry, I missed this reply. Luckily @cary-ilm drawn my attention on this.

That option seems to work just fine.

https://github.com/sanguinariojoe/openexr/actions/runs/5701914625

I actually did not know you can add such an option to CMake... My bad