[gdal-dev] OpenJPEG JPEG2000 Driver
Mateusz Loskot
mateusz at loskot.net
Tue Feb 14 22:25:08 PST 2023
On Wed, 15 Feb 2023 at 01:34, Simon Eves <simon.eves at heavy.ai> wrote:
>
> I tried adding -DCMAKE_CPP_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC" to the OpenJPEG build CMake invocation, but that made no difference.
>
More CMake-idiomatic way is to use -DCMAKE_POSITION_INDEPENDENT_CODE=ON instead.
It used to be there
https://github.com/OSGeo/gdal/commit/a0128debca5dd77a64188cc7ac3ba60866a70e89
until https://github.com/OSGeo/gdal/issues/5649
and there is GDAL-specific variable now
-DGDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE=ON
https://github.com/OSGeo/gdal/blob/master/gdal.cmake#L42-L43
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the gdal-dev
mailing list