From: Matthew Bentham Date: Wed, 20 May 2020 09:44:18 +0000 (+0100) Subject: Find default build location for Compute Library binaries. X-Git-Tag: submit/tizen/20210421.062230~526 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2624dd719a78d02e7500557d284191f90f7a707e;p=platform%2Fupstream%2Farmnn.git Find default build location for Compute Library binaries. In common cases this reduces the cmake arguments needed for Compute Library from: "cmake -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DARMCOMPUTE_ROOT=../ComputeLibrary -DARMCOMPUTE_BUILD_DIR=ARMCOMPUTE_BUILD_DIR=../ComputeLibrary/build -DSHARED_BOOST=1 ../armnn/" to: "cmake -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DARMCOMPUTE_ROOT=../ComputeLibrary -DSHARED_BOOST=1 ../armnn/" Signed-off-by: Matthew Bentham Change-Id: I992f4ef428f10dc92ca9457fe8981ae3af93f538 --- diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index 968642b..4e20cc7 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -238,6 +238,11 @@ if(ARMCOMPUTENEON OR ARMCOMPUTECL) # We link to the static variant so that customers don't need to find and build a compatible version of clframework. # First try the folders specified ARMCOMPUTE_BUILD_DIR (with PATH_SUFFIXES for # Windows builds) + if ((NOT DEFINED ARMCOMPUTE_BUILD_DIR) AND (DEFINED ARMCOMPUTE_ROOT)) + # Default build directory for ComputeLibrary is under the root + set(ARMCOMPUTE_BUILD_DIR ${ARMCOMPUTE_ROOT}/build) + endif() + find_library(ARMCOMPUTE_LIBRARY_DEBUG NAMES arm_compute-static PATHS ${ARMCOMPUTE_BUILD_DIR} PATH_SUFFIXES "Debug"