IVGCVSW-5795 Use ${CMAKE_THREAD_LIBS_INIT} throughout instead of 'pthread'

Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: I32a92e0efabefd1e342203a13f11a622a3e25076
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c3ef03..7a1db7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,7 +223,7 @@
             ${FLATBUFFERS_LIBRARY})
 
     if(Threads_FOUND AND (NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android)))
-        target_link_libraries(ArmnnQuantizerMain pthread)
+        target_link_libraries(ArmnnQuantizerMain ${CMAKE_THREAD_LIBS_INIT})
     endif()
 
     set_target_properties(armnnQuantizer PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
@@ -652,7 +652,7 @@
 endif()
 
 if(PROFILING_BACKEND_STREAMLINE AND (NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android)))
-    target_link_libraries(armnn pthread)
+    target_link_libraries(armnn ${CMAKE_THREAD_LIBS_INIT})
 endif()
 
 set_target_properties(armnn PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})