Bugfix: Don't try to link pipeCommon if it's not being built
authorFrancis Murtagh <francis.murtagh@arm.com>
Tue, 27 Oct 2020 16:53:25 +0000 (16:53 +0000)
committerFrancis Murtagh <francis.murtagh@arm.com>
Wed, 28 Oct 2020 12:11:41 +0000 (12:11 +0000)
 * 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

CMakeLists.txt

index 99e989b..66f6301 100644 (file)
@@ -588,7 +588,11 @@ target_include_directories(armnn
         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)