Add 'static_nnfw_util' (#1568)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 5 Jun 2018 08:39:43 +0000 (17:39 +0900)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 5 Jun 2018 08:39:43 +0000 (17:39 +0900)
This commit adds 'static_nnfw_util' target which provides a static
nnfw_util library (to make it easy to deploy binaries).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
libs/util/CMakeLists.txt

index 52ed272..187408d 100644 (file)
@@ -8,6 +8,10 @@ list(APPEND NNFW_UTILITY_SRCS src/tensor/Comparator.cpp)
 add_library(nnfw_util SHARED ${NNFW_UTILITY_SRCS})
 target_include_directories(nnfw_util PUBLIC ${NNFW_INCLUDE_DIR})
 
+add_library(static_nnfw_util STATIC ${NNFW_UTILITY_SRCS})
+target_include_directories(static_nnfw_util PUBLIC ${NNFW_INCLUDE_DIR})
+set_target_properties(static_nnfw_util PROPERTIES POSITION_INDEPENDENT_CODE ON)
+
 install(TARGETS nnfw_util
         RUNTIME DESTINATION bin COMPONENT libraries
         LIBRARY DESTINATION lib COMPONENT libraries)