Skip to content

Commit

Permalink
Fix zlib and zstd static build
Browse files Browse the repository at this point in the history
Use POSITION_INDEPENDENT_CODE prperty for static libraries
  • Loading branch information
9EOR9 committed Jan 31, 2022
1 parent e2bbe58 commit d04c5d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions external/zlib/CMakeLists.txt
Expand Up @@ -3,3 +3,4 @@ INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/zlib)
SET(SOURCE_FILES adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c minigzip.c trees.c uncompr.c zutil.c)

ADD_LIBRARY(zlib STATIC ${SOURCE_FILES})
set_property(TARGET zlib PROPERTY POSITION_INDEPENDENT_CODE ON)
1 change: 1 addition & 0 deletions external/zstd/CMakeLists.txt
Expand Up @@ -37,3 +37,4 @@ lib/dictBuilder/zdict.c)
INCLUDE_DIRECTORIES(lib/common)

ADD_LIBRARY(zstd STATIC ${SOURCE_FILES})
set_property(TARGET zstd PROPERTY POSITION_INDEPENDENT_CODE ON)

0 comments on commit d04c5d3

Please sign in to comment.