From 84197328b522fd2915d20b3ca886ade4d39322e1 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 21 Jul 2021 15:01:40 -0400 Subject: [PATCH] Compile libsoxr with position independent code on Linux... ... so that an extracted library can link to it --- cmake-proxies/libsoxr/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake-proxies/libsoxr/CMakeLists.txt b/cmake-proxies/libsoxr/CMakeLists.txt index 00afba57f..3cb20ebad 100644 --- a/cmake-proxies/libsoxr/CMakeLists.txt +++ b/cmake-proxies/libsoxr/CMakeLists.txt @@ -95,3 +95,6 @@ target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} ) target_compile_options( ${TARGET} PRIVATE ${OPTIONS} ) target_include_directories( ${TARGET} PRIVATE ${INCLUDES} ) +if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) + target_compile_options( ${TARGET} PRIVATE -fPIC ) +endif()