From d0e10d3b735e11ca04adcf7eb72e5ecd475af2f7 Mon Sep 17 00:00:00 2001 From: Paolo Bosetti Date: Thu, 8 Aug 2024 13:26:55 +0200 Subject: [PATCH] Added -fPIC compile option on UNIX --- cmake/ftxui_set_options.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/ftxui_set_options.cmake b/cmake/ftxui_set_options.cmake index ad4acaa..077afdf 100644 --- a/cmake/ftxui_set_options.cmake +++ b/cmake/ftxui_set_options.cmake @@ -49,6 +49,10 @@ function(ftxui_set_options library) target_compile_options(${library} PUBLIC "/utf-8") endif() + if(UNIX) + target_compile_options(${library} PRIVATE "-fPIC") + endif() + # Add as many warning as possible: if (WIN32) if (MSVC)