gdraheim / zziplib

The ZZIPlib provides read access on ZIP-archives and unpacked data. It features an additional simplified API following the standard Posix API for file access
Other
60 stars 50 forks source link

Fix CMAKE_POSITION_INDEPENDENT_CODE #126

Closed fjtrujy closed 2 years ago

fjtrujy commented 2 years ago

Description

This PR fixes compilation issues for those platforms that don't support the POSITION_INDEPENDENT_CODE This value should be just enabled if the property BUILD_SHARED_LIBS is enabled.

In my case I'm trying to compile the library for the Playstation Portable platform

Otherwise we're suffering issues as:

cc1: error: cannot generate position-independent code for ‘-mabi=eabi’
cc1: error: cannot generate position-independent code for ‘-mabi=eabi’
cc1: error: cannot generate position-independent code for ‘-mabi=eabi’
cc1: error: cannot generate position-independent code for ‘-mabi=eabi’

Thanks