Skip to content

Commit

Permalink
Set position independent code on when building static library.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsorby committed Apr 26, 2022
1 parent 2f2198f commit 29930a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ if (WIN32)
endif()
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(xml2 PUBLIC LIBXML_STATIC)
set_target_properties(xml2 PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
if(WITH_THREADS)
target_compile_definitions(xml2 PRIVATE _REENTRANT)
Expand Down

0 comments on commit 29930a0

Please sign in to comment.