Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

l_openvino_toolkit_p_2020.1.023 CMake Error

Kaliyappan__Malathi
728 Views

Hi,

I am working on pedestrian_tracker_demo in OpenVINO (l_openvino_toolkit_p_2020.1.023). I had already worked in pedestrian tracker in 2019 R1 version. Since I faced memory leak issue I started working with 2020.1 version.

I was using libcurl in 2019 R1 version to alert me when ever I see a pedestrian, Please find the CMake file ( CMakeLists.txt ) attached below (The libcurl is statically linked)

Here I also attached the CMake file for 2020.1 version(Please check CMakeLists_2020.txt with libCurl statically linked, but did not work)

I tried to use the old CMake file(2019 R1) in 2020.1 vesion , The reason to use is statically link the libcurl(as I did not know, how to link in the 2020.1 CMAKE ).

Can you please advise me how to link the libCurl to the CMAKE file.

Please find the Error Message,

Setting environment variables for building demos...
[setupvars.sh] OpenVINO environment initialized
cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include fnmatch.h
-- Looking for C++ include fnmatch.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Looking for strtoll
-- Looking for strtoll - found
-- Found OpenCV: /opt/intel/openvino_2020.1.023/opencv (found version "4.2.0") found components:  core imgproc 
-- Found InferenceEngine: /opt/intel/openvino_2020.1.023/deployment_tools/inference_engine/lib/intel64/libinference_engine.so (Required is at least version "2.0") 
-- Found CURL: /usr/local/lib/libcurl.so (found version "7.69.0-DEV") 
CMake Error at pedestrian_tracker_demo/CMakeLists.txt:40 (add_dependencies):
  Cannot add target-level dependencies to non-existent target
  "pedestrian_tracker_demo".

  The add_dependencies works for top-level logical targets created by the
  add_executable, add_library, or add_custom_target commands.  If you want to
  add file-level dependencies see the DEPENDS option of the add_custom_target
  and add_custom_command commands.


CMake Error at pedestrian_tracker_demo/CMakeLists.txt:41 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  pedestrian_tracker_demo


CMake Error at pedestrian_tracker_demo/CMakeLists.txt:45 (target_include_directories):
  Cannot specify include directories for target "pedestrian_tracker_demo"
  which is not built by this project.


CMake Error at pedestrian_tracker_demo/CMakeLists.txt:46 (target_link_libraries):
  Cannot specify link libraries for target "pedestrian_tracker_demo" which is
  not built by this project.


-- Configuring incomplete, errors occurred!
See also "/root/omz_demos_build/CMakeFiles/CMakeOutput.log".
Error on or near line 84; exiting with status 1

 

0 Kudos
1 Reply
SIRIGIRI_V_Intel
Employee
728 Views

Hi Malathi,

You can add the below commands in <path_to_openvino>/deployment_tools/open_model_zoo/demos/CMakeLists.txt to link curl package

[Ln 157]:

FIND_PACKAGE(CURL REQUIRED)

Modify [Ln 185]:

target_link_libraries(${IE_SAMPLE_NAME} PRIVATE ${OpenCV_LIBRARIES} {InferenceEngine_LIBRARIES} ${IE_SAMPLE_DEPENDENCIES} gflags -lcurl)

I have successfully built pedestrian_tracker_demo with libcurl by adding the mentioned commands.

Please give a try and let me know if it works.

Regards,

Ram prasad

0 Kudos
Reply