aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Botella <arnaud.botella@geode-solutions.com>2019-12-06 17:25:37 +0100
committerGitHub <noreply@github.com>2019-12-06 17:25:37 +0100
commitaa2e0909acb05c94951fac2752b20ac3abc08374 (patch)
treee1862dae4fc36376fca4087c28a55fead90ee17b
parent53a30c65712245ff569a0660094ad71550fb7566 (diff)
downloadpugixml-aa2e0909acb05c94951fac2752b20ac3abc08374.zip
pugixml-aa2e0909acb05c94951fac2752b20ac3abc08374.tar.gz
pugixml-aa2e0909acb05c94951fac2752b20ac3abc08374.tar.bz2
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
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5b49ca..5ff6dce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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})