From f557d6e8ed3bd1b86abb824e637e76762aa0e9dd Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Wed, 26 May 2021 01:49:15 +0200 Subject: CMake: Enable PIC (Position Independent Code) https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c80405..5a9a3f0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ include(TestBigEndian) add_library(libhamcore STATIC) +set_property(TARGET libhamcore PROPERTY POSITION_INDEPENDENT_CODE ON) + test_big_endian(BIG_ENDIAN) if(BIG_ENDIAN) target_compile_definitions(libhamcore PRIVATE "BYTE_ORDER_BIG_ENDIAN") -- cgit v1.2.3