summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--opentrack/CMakeLists.txt5
-rw-r--r--tracker-neuralnet/CMakeLists.txt5
2 files changed, 10 insertions, 0 deletions
diff --git a/opentrack/CMakeLists.txt b/opentrack/CMakeLists.txt
index a8829aa5..7a83beb6 100644
--- a/opentrack/CMakeLists.txt
+++ b/opentrack/CMakeLists.txt
@@ -1,3 +1,8 @@
+if(MSVC)
+ add_compile_options(-EHsc)
+ add_definitions(-D_HAS_EXCEPTIONS=1)
+endif()
+
otr_module(executable EXECUTABLE BIN)
set_target_properties(opentrack-executable PROPERTIES
diff --git a/tracker-neuralnet/CMakeLists.txt b/tracker-neuralnet/CMakeLists.txt
index 70850925..fe8c85b2 100644
--- a/tracker-neuralnet/CMakeLists.txt
+++ b/tracker-neuralnet/CMakeLists.txt
@@ -4,6 +4,11 @@ find_package(OpenMP QUIET) # Used to control number of onnx threads.
find_package(ONNXRuntime QUIET)
if(OpenCV_FOUND AND ONNXRuntime_FOUND AND OpenMP_FOUND)
+ if(MSVC)
+ add_compile_options(-EHsc)
+ add_definitions(-D_HAS_EXCEPTIONS=1)
+ endif()
+
otr_module(tracker-neuralnet)
target_link_libraries(${self}