From 59e057fbbf315419724bf71fe9c7f617248e7aee Mon Sep 17 00:00:00 2001 From: Pavel Macenauer Date: Wed, 15 Apr 2020 14:17:26 +0000 Subject: Integration of PyArmNN into CMake Change-Id: Ice37e693f4598a6b3c38bd38d89f1d35cdaa8a18 Signed-off-by: Pavel Macenauer --- cmake/GlobalConfig.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'cmake') diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index 08cbb1b3d0..968642b35d 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -1,3 +1,8 @@ +# +# Copyright © 2020 Arm Ltd. All rights reserved. +# Copyright 2020 NXP +# SPDX-License-Identifier: MIT +# option(BUILD_CAFFE_PARSER "Build Caffe parser" OFF) option(BUILD_TF_PARSER "Build Tensorflow parser" OFF) option(BUILD_ONNX_PARSER "Build Onnx parser" OFF) @@ -25,6 +30,8 @@ option(BUILD_GATORD_MOCK "Build the Gatord simulator for external profiling test option(BUILD_TIMELINE_DECODER "Build the Timeline Decoder for external profiling." ON) option(SHARED_BOOST "Use dynamic linking for boost libraries" OFF) option(BUILD_BASE_PIPE_SERVER "Build the server to handle external profiling pipe traffic" ON) +option(BUILD_PYTHON_WHL "Build Python wheel package" OFF) +option(BUILD_PYTHON_SRC "Build Python source package" OFF) include(SelectLibraryConfigurations) @@ -376,5 +383,30 @@ if(NOT BUILD_ARMNN_QUANTIZER) message(STATUS "ArmNN Quantizer support is disabled") endif() +if(NOT BUILD_PYTHON_WHL) + message(STATUS "PyArmNN wheel package is disabled") +endif() + +if(NOT BUILD_PYTHON_SRC) + message(STATUS "PyArmNN source package is disabled") +endif() + +if(BUILD_PYTHON_WHL OR BUILD_PYTHON_SRC) + find_package(PythonInterp 3 REQUIRED) + if(NOT ${PYTHONINTERP_FOUND}) + message(FATAL_ERROR "Python 3.x required to build PyArmNN, but not found") + endif() + + find_package(PythonLibs 3 REQUIRED) + if(NOT ${PYTHONLIBS_FOUND}) + message(FATAL_ERROR "Python 3.x development package required to build PyArmNN, but not found") + endif() + + find_package(SWIG 4 REQUIRED) + if(NOT ${SWIG_FOUND}) + message(FATAL_ERROR "SWIG 4.x requried to build PyArmNN, but not found") + endif() +endif() + # ArmNN source files required for all build options include_directories(SYSTEM third-party) -- cgit v1.2.1