diff options
Diffstat (limited to 'infra/nnfw/cmake/packages/TensorFlowSourceConfig.cmake')
-rw-r--r-- | infra/nnfw/cmake/packages/TensorFlowSourceConfig.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/infra/nnfw/cmake/packages/TensorFlowSourceConfig.cmake b/infra/nnfw/cmake/packages/TensorFlowSourceConfig.cmake new file mode 100644 index 000000000..f9fd3af13 --- /dev/null +++ b/infra/nnfw/cmake/packages/TensorFlowSourceConfig.cmake @@ -0,0 +1,18 @@ +function(_TensorFlowSource_import) + if(NOT DOWNLOAD_TENSORFLOW) + set(TensorFlowSource_FOUND FALSE PARENT_SCOPE) + return() + endif(NOT DOWNLOAD_TENSORFLOW) + + nnfw_include(ExternalSourceTools) + nnfw_include(OptionTools) + + envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") + set(TENSORFLOW_URL ${EXTERNAL_DOWNLOAD_SERVER}/tensorflow/tensorflow/archive/v1.13.1.tar.gz) + ExternalSource_Get("tensorflow" ${DOWNLOAD_TENSORFLOW} ${TENSORFLOW_URL}) + + set(TensorFlowSource_DIR ${tensorflow_SOURCE_DIR} PARENT_SCOPE) + set(TensorFlowSource_FOUND ${tensorflow_SOURCE_GET} PARENT_SCOPE) +endfunction(_TensorFlowSource_import) + +_TensorFlowSource_import() |