Build the static library as position independent
This allows it to be compiled into other shared libraries (like the Python bindings) on x86_64 Linux systems.
This commit is contained in:
@ -113,6 +113,9 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
#Build
|
||||
IF(LIBRARY_TYPE STREQUAL "STATIC")
|
||||
ADD_LIBRARY(PolyVoxCore STATIC ${CORE_SRC_FILES} ${CORE_INC_FILES} ${IMPL_SRC_FILES} ${IMPL_INC_FILES})
|
||||
IF(UNIX)
|
||||
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS -fPIC)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(LIBRARY_TYPE STREQUAL "DYNAMIC")
|
||||
ADD_LIBRARY(PolyVoxCore SHARED ${CORE_SRC_FILES} ${CORE_INC_FILES} ${IMPL_SRC_FILES} ${IMPL_INC_FILES})
|
||||
|
Reference in New Issue
Block a user