From fc4a4bfb7c8d4605e6cffde57f5d374681674283 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sun, 3 May 2020 12:19:58 -0700 Subject: [PATCH] fix #194 / linux needs to built with position independant code --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62334aed..190d7285 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)