From: MyungJoo Ham Date: Mon, 26 Nov 2018 07:41:53 +0000 (+0900) Subject: [CMake] Do not download anything during build. X-Git-Tag: v0.0.3~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=baa3211edb9d5c86f2f2c79a4b9c8c0bc4c4c836;p=platform%2Fupstream%2Fnnstreamer.git [CMake] Do not download anything during build. Let the user download the model at run-time with the given scripts. They will be able to do so after #909 With #909, this concludes #866 Signed-off-by: MyungJoo Ham --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0acc938..159f22a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ PROJECT(nnstreamer C CXX) OPTION(ENABLE_TENSORFLOW_LITE "Enable tensorflow-lite support" ON) OPTION(ENABLE_TENSORFLOW "Enable tensorflow support" OFF) -OPTION(ENABLE_MODEL_DOWNLOAD "Enable download the model files" ON) OPTION(INSTALL_EXAMPLE_APP "Install example applications" OFF) OPTION(ENABLE_TEST "Enable tests" ON) diff --git a/nnstreamer_example/example_object_detection/CMakeLists.txt b/nnstreamer_example/example_object_detection/CMakeLists.txt index 1968c06..69fa6bc 100644 --- a/nnstreamer_example/example_object_detection/CMakeLists.txt +++ b/nnstreamer_example/example_object_detection/CMakeLists.txt @@ -1,40 +1,6 @@ # demo app pkg_check_modules(cairo_pkg REQUIRED cairo) -if(ENABLE_MODEL_DOWNLOAD) - if(NOT EXISTS "${CMAKE_BINARY_DIR}/tflite_model_ssd/ssd_mobilenet_v2_coco.tflite") - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tflite_model_ssd) - - message("-- [START TO DOWNLOAD REQUIRED RESOURCES: Model]") - file(DOWNLOAD - "https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/ssd_mobilenet_v2_coco.tflite" - "${CMAKE_BINARY_DIR}/tflite_model_ssd/ssd_mobilenet_v2_coco.tflite" - SHOW_PROGRESS - ) - endif() - - if(NOT EXISTS "${CMAKE_BINARY_DIR}/tflite_model_ssd/coco_labels_list.txt") - message("-- [START TO DOWNLOAD REQUIRED RESOURCES: Label]") - file(DOWNLOAD - "https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/coco_labels_list.txt" - "${CMAKE_BINARY_DIR}/tflite_model_ssd/coco_labels_list.txt" - SHOW_PROGRESS - ) - endif() - - - if(NOT EXISTS "${CMAKE_BINARY_DIR}/tflite_model_ssd/box_priors.txt") - message("-- [START TO DOWNLOAD REQUIRED RESOURCES: Box_prior]") - file(DOWNLOAD - "https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/box_priors.txt" - "${CMAKE_BINARY_DIR}/tflite_model_ssd/box_priors.txt" - SHOW_PROGRESS - ) - endif() -else() - message("-- [MODEL DOWNLOAD IS BLOCKED]") -endif(ENABLE_MODEL_DOWNLOAD) - ADD_EXECUTABLE(nnstreamer_example_object_detection nnstreamer_example_object_detection.cc) TARGET_LINK_LIBRARIES(nnstreamer_example_object_detection ${apppkgs_LIBRARIES} ${cairo_pkg_LIBRARIES}) diff --git a/packaging/nnstreamer.spec b/packaging/nnstreamer.spec index a79aab5..30b86c6 100644 --- a/packaging/nnstreamer.spec +++ b/packaging/nnstreamer.spec @@ -89,7 +89,7 @@ mkdir -p build pushd build export GST_PLUGIN_PATH=$(pwd) export LD_LIBRARY_PATH=$(pwd):$(pwd)/gst/tensor_filter -%cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DENABLE_MODEL_DOWNLOAD=OFF -DINSTALL_EXAMPLE_APP=ON +%cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DINSTALL_EXAMPLE_APP=ON make %{?_smp_mflags} %if 0%{?unit_test} ./tests/unittest_common