From 94e7374bad0da0d9d132401bd57526b509497c7d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 13 Apr 2023 23:54:13 +0200 Subject: tracker/nn: fix build --- tracker-neuralnet/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tracker-neuralnet/CMakeLists.txt b/tracker-neuralnet/CMakeLists.txt index 9298cd1f..db568fae 100644 --- a/tracker-neuralnet/CMakeLists.txt +++ b/tracker-neuralnet/CMakeLists.txt @@ -25,8 +25,11 @@ if(OpenCV_FOUND AND ONNXRuntime_FOUND AND OpenMP_FOUND) opencv_core OpenMP::OpenMP_CXX ) + # OpenMP::OpenMP_CXX doesn't set up the -fopenmp linking option, so set it up ourselves. - target_link_options(${self} PUBLIC ${OpenMP_CXX_FLAGS}) + if(NOT MSVC) + target_link_options(${self} PUBLIC ${OpenMP_CXX_FLAGS}) + endif() install( FILES "models/head-localizer.onnx" -- cgit v1.2.3