diff --git a/CMakeLists.txt b/CMakeLists.txt index e95e6c0..f4fe1cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ if(BUILD_SHARED_LIBS) add_library(pugixml SHARED ${HEADERS} ${SOURCES}) else() add_library(pugixml STATIC ${HEADERS} ${SOURCES}) + set_property(TARGET pugixml PROPERTY POSITION_INDEPENDENT_CODE ON) endif() # Export symbols for shared library builds