Bugfix: Don't try to link pipeCommon if it's not being built

 * If BUILD_TIMELINE_DECODER=0 it gave /usr/bin/ld: cannot find -lpipeCommon

Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: Ib10e894c54f32370a96b702a6f1b462fda31388b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99e989b..66f6301 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -588,7 +588,11 @@
         profiling/common/include
 )
 
-target_link_libraries(armnn armnnUtils pipeCommon)
+target_link_libraries(armnn armnnUtils)
+# only link pipeCommon if it has been built
+if(BUILD_TIMELINE_DECODER)
+    target_link_libraries(armnn pipeCommon)
+endif()
 
 target_link_libraries(armnn ${CMAKE_DL_LIBS})
 if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)