From e62256e22898a3972d0af11bd80a8781515127fb Mon Sep 17 00:00:00 2001 From: Elijah Rippeth Date: Thu, 15 Oct 2020 09:38:12 -0400 Subject: [PATCH] replace find and append with consistent USE_* flags --- android/pytorch_android/CMakeLists.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/android/pytorch_android/CMakeLists.txt b/android/pytorch_android/CMakeLists.txt index 1c2e08c57736..85350b461ffd 100644 --- a/android/pytorch_android/CMakeLists.txt +++ b/android/pytorch_android/CMakeLists.txt @@ -122,11 +122,6 @@ if(ANDROID_ABI) libclog ) else() - find_package(nnpack) - find_package(XNNPACK) - find_package(pthreadpool) - find_package(pytorch_qnnpack) - # Prefer dynamic linking on the host set(pytorch_jni_LIBS fbjni @@ -137,19 +132,19 @@ else() clog ) - if(nnpack_FOUND) + if(USE_NNPACK) list(APPEND pytorch_jni_LIBS nnpack) endif() - if(XNNPACK_FOUND) + if(USE_XNNPACK) list(APPEND pytorch_jni_LIBS XNNPACK) endif() - if(pthreadpool_FOUND) + if(USE_SYSTEM_PTHREADPOOL) list(APPEND pytorch_jni_LIBS pthreadpool) endif() - if(pytorch_qnnpack_FOUND) + if(USE_PYTORCH_QNNPACK) list(APPEND pytorch_jni_LIBS pytorch_qnnpack) endif()