From f6d054697ba50af4a6a59a6381495b813bc236da Mon Sep 17 00:00:00 2001 From: Ghislain MARY <ghislain.mary@belledonne-communications.com> Date: Thu, 27 Apr 2023 18:33:48 +0200 Subject: [PATCH] Use the CMAKE_INDEPENDENT_CODE property instead of using -fPIC compilation option as this option is not valid for all compilers. --- coreapi/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index e1f9540e9e..4ae759ad2d 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -150,8 +150,8 @@ if(ENABLE_JAVA_WRAPPER) endif() if(BUILD_SHARED_LIBS) - target_compile_options(linphone-coreapi PRIVATE "-fPIC") -endif () + set_target_properties(linphone-coreapi PROPERTIES POSITION_INDEPENDENT_CODE TRUE) +endif() add_subdirectory(help) -- GitLab