[neurun] Use LIB_PTHREAD variable in CMake (#7069)
author이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Fri, 30 Aug 2019 09:25:38 +0000 (18:25 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 30 Aug 2019 09:25:38 +0000 (18:25 +0900)
Use variable `${LIB_PTHREAD}` rather than hardcoded `pthread`. This is
useful for Android build which does not have pthread lib. Android
contains pthread in libc.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtimes/neurun/frontend/api/CMakeLists.txt

index a79d92d..10a33a8 100644 (file)
@@ -5,7 +5,7 @@ add_library(${NEURUN_DEV} SHARED ${API_SRC})
 
 target_link_libraries(${NEURUN_DEV} PUBLIC nnfw-header)
 target_link_libraries(${NEURUN_DEV} PUBLIC neurun_core) # TODO Link PRIVATE neurun_core
-target_link_libraries(${NEURUN_DEV} PRIVATE jsoncpp tflite_loader pthread)
+target_link_libraries(${NEURUN_DEV} PRIVATE jsoncpp tflite_loader ${LIB_PTHREAD})
 target_link_libraries(${NEURUN_DEV} PRIVATE nnfw_common)
 target_link_libraries(${NEURUN_DEV} PRIVATE nnfw_coverage)