Add POSITION_INDEPENDENT_CODE option

Allow to use the static library in other dynamic librairies. This is a standard cmake option https://cmake.org/cmake/help/v3.11/prop_tgt/POSITION_INDEPENDENT_CODE.html#prop_tgt:POSITION_INDEPENDENT_CODE
This commit is contained in:
Arnaud Botella 2019-12-06 17:25:37 +01:00 committed by GitHub
parent 53a30c6571
commit aa2e0909ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,7 @@ set_target_properties(pugixml-shared pugixml-static pugixml
PROPERTIES
MSVC_RUNTIME_LIBRARY ${CMAKE_MSVC_RUNTIME_LIBRARY}
EXCLUDE_FROM_ALL ON
POSITION_INDEPENDENT_CODE ON
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION})