How to prepare Windows environent for hailort compilation

Before running the examlpe, there should be a few preliminery steps done.

  1. Install Visual Studio. We’ve done this tutorial with VS 2022
  2. Install OpenCV. Download the extraceable file from OpenCV, extract it as the instructions guides you. Take a note for the path of the installed package. For my case it is C:\Users\nadave\OneDrive - Hailo\Documents\libraries\opencv\build
  3. Add the above path in the Environment Variables. If not already present, create a new variable called CMAKE_MODULE_PATH and add this path to it.(To get to the Environment Variables menu, right click on the Windows button, choose ‘System’, and then ‘Advanced System Settings’:
    image
    From there you would see the Environment Variable button.
  4. Add an OpenCV_DIR variable with a build\x64\vc16 directory from the opencv directory.
  5. Download the hailort .msi installer from the Deverloper-Zone, and install it by following the instructions. By default, the hailort pacakge is installed in the Program Files directory.
  6. Add the hailort directory, in my example C:\Program Files\HailoRT\lib\cmake\HailoRT to the CMAKE_MODULE_PATH Environment Variable. After this step it would look like this:
    image

Here’s an example of CMakeLists.txt file to test the environment:

cmake_minimum_required (VERSION 3.11)
project(setup_test)

set(CMAKE_CXX_STANDARD 20)
find_package(Threads REQUIRED)
find_package(HailoRT REQUIRED)
find_package(OpenCV  REQUIRED)
1 Like