[tf2tflite] make proto sources shared (#9409)
author채성우/On-Device Lab(SR)/Engineer/삼성전자 <sw4670.chae@samsung.com>
Thu, 5 Dec 2019 08:22:17 +0000 (17:22 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 5 Dec 2019 08:22:17 +0000 (17:22 +0900)
* [tf2tflite] make proto sources shared

This commit changes proto sources from STATIC to SHARED.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
* add install command

compiler/tf2tflite/CMakeLists.txt

index 23c3849..663563e 100644 (file)
@@ -23,10 +23,11 @@ Protobuf_Generate(CUSTOMOP_INFO_PROTO
                   "./proto"
                   CustomOpInfo.proto)
 
-add_library(tf2tflite_customop_info_proto STATIC ${CUSTOMOP_INFO_PROTO_SOURCES})
+add_library(tf2tflite_customop_info_proto SHARED ${CUSTOMOP_INFO_PROTO_SOURCES})
 set_target_properties(tf2tflite_customop_info_proto PROPERTIES POSITION_INDEPENDENT_CODE ON)
 target_include_directories(tf2tflite_customop_info_proto PUBLIC ${CUSTOMOP_INFO_PROTO_INCLUDE_DIRS})
 target_link_libraries(tf2tflite_customop_info_proto PUBLIC libprotobuf)
+install(TARGETS tf2tflite_customop_info_proto DESTINATION lib)
 
 file(GLOB_RECURSE SOURCES "src/*.cpp")