Add Position-Independed Code option for static build

This commit is contained in:
Ilya Orlov 2018-06-02 01:46:08 +03:00
parent e584ea337e
commit 952bcc7e02

View File

@ -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