From 0def63d86fab48b87b3856b4f318f913cc5a6327 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Sat, 21 Jan 2017 18:38:58 -0500 Subject: [PATCH] compile libstudxml as pic when building shared xlnt [ci skip] --- third-party/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 3c3be247..1dd312e0 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -56,3 +56,7 @@ add_custom_command(TARGET libstudxml-config PRE_BUILD copy ${CMAKE_CURRENT_SOURCE_DIR}/../source/detail/xml/details/config.h ${LIBSTUDXML_ROOT_DIR}/xml/details) add_dependencies(libstudxml libstudxml-config) + +if(NOT STATIC) + set_target_properties(libstudxml PROPERTIES POSITION_INDEPENDENT_CODE 1) +endif()