mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
compile third-party lib with -fPIC when building xlnt as shared lib
This commit is contained in:
parent
3c7c40cdfa
commit
5b062d2064
5
third-party/CMakeLists.txt
vendored
5
third-party/CMakeLists.txt
vendored
|
@ -45,6 +45,11 @@ add_custom_command(OUTPUT ${BOTAN}
|
||||||
add_library(xlnt.third-party OBJECT ${MINIZ} ${LIBSTUDXML} ${POLE} ${BOTAN})
|
add_library(xlnt.third-party OBJECT ${MINIZ} ${LIBSTUDXML} ${POLE} ${BOTAN})
|
||||||
target_compile_definitions(xlnt.third-party PRIVATE LIBSTUDXML_STATIC_LIB=1)
|
target_compile_definitions(xlnt.third-party PRIVATE LIBSTUDXML_STATIC_LIB=1)
|
||||||
|
|
||||||
|
if(NOT STATIC)
|
||||||
|
set_target_properties(xlnt.third-party
|
||||||
|
PROPERTIES POSITION_INDEPENDENT_CODE 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_definitions(xlnt.third-party PRIVATE _CRT_SECURE_NO_WARNINGS=1 NOMINMAX)
|
target_compile_definitions(xlnt.third-party PRIVATE _CRT_SECURE_NO_WARNINGS=1 NOMINMAX)
|
||||||
set_target_properties(xlnt.third-party PROPERTIES COMPILE_FLAGS "/MP")
|
set_target_properties(xlnt.third-party PROPERTIES COMPILE_FLAGS "/MP")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user