From 7984fd7e56e0dd69f2380dcb521250a5522097b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Tue, 26 Jun 2018 17:38:47 +0900 Subject: [PATCH] Tensorflow Lite as Position Independent Static Library (#371) This commit revises TensorFlowLite module to insert -fPIC option when building "libtensorflowlite.a". This option will allow tensorflow lite to be linked into shared library. Signed-off-by: Jonghyun Park --- cmake/packages/TensorFlowLiteConfig.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/packages/TensorFlowLiteConfig.cmake b/cmake/packages/TensorFlowLiteConfig.cmake index 36395ce..8fe09da 100644 --- a/cmake/packages/TensorFlowLiteConfig.cmake +++ b/cmake/packages/TensorFlowLiteConfig.cmake @@ -58,6 +58,7 @@ function(_TensorFlowLite_import) if(NOT TARGET tensorflowlite) add_library(tensorflowlite ${SRCS}) + set_target_properties(tensorflowlite PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(tensorflowlite PUBLIC ${TensorFlowSource_DIR}) target_compile_options(tensorflowlite PUBLIC -Wno-ignored-attributes) target_compile_definitions(tensorflowlite PUBLIC "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK") -- 2.7.4