Newer
Older
Import / applications / MakePDF / 3rdParty / libharu-with-PRs / pr-patches / 0001-Added-fPIC-flag-for-x86-builds.patch
@John John on 29 Dec 2020 946 bytes bulk import from macbookpro checkouts
From a3c40f4985c3b24913317c8ab189a9d6330f725a Mon Sep 17 00:00:00 2001
From: root <root@ip-10-195-42-240.eu-west-1.compute.internal>
Date: Fri, 26 Feb 2016 14:41:49 +0000
Subject: [PATCH] Added fPIC flag for x86 builds

---
 src/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9d2a604..0231564 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -72,6 +72,11 @@ set(
 # =======================================================================
 if(LIBHPDF_STATIC)
   add_library(${LIBHPDF_NAME_STATIC} STATIC ${LIBHPDF_SRCS})
+
+  if( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
+      set_target_properties(${LIBHPDF_NAME_STATIC} PROPERTIES COMPILE_FLAGS "-fPIC")
+  endif( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
+
   target_link_libraries(${LIBHPDF_NAME_STATIC} ${ADDITIONAL_LIBRARIES})
   install(
     TARGETS ${LIBHPDF_NAME_STATIC}
-- 
2.21.1 (Apple Git-122.3)