Fix BUILD_SHARED_LIBS=ON GCC build

This commit is contained in:
Mathieu Lamarre 2018-02-03 11:26:27 -05:00
parent d7f6222702
commit be7fc68fbf

View File

@ -737,6 +737,9 @@ if (EMSCRIPTEN)
else ()
# Standard Draco libs, encoder and decoder.
# Object collections that mirror the Draco directory structure.
if (BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
add_library(draco_attributes OBJECT ${draco_attributes_sources})
add_library(draco_compression_attributes_dec OBJECT
${draco_compression_attributes_dec_sources})