fix #194 / linux needs to built with position independant code

This commit is contained in:
Benjamin Sergeant 2020-05-03 12:19:58 -07:00 committed by GitHub
parent 9e54fd5f1a
commit fc4a4bfb7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,10 @@ add_library( ixwebsocket STATIC
add_library ( ixwebsocket::ixwebsocket ALIAS ixwebsocket )
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
if (USE_TLS)
target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_TLS)
if (USE_MBED_TLS)