summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-aruco/CMakeLists.txt5
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/tracker-aruco/CMakeLists.txt b/tracker-aruco/CMakeLists.txt
index 506c9bd1..dfbc18a3 100644
--- a/tracker-aruco/CMakeLists.txt
+++ b/tracker-aruco/CMakeLists.txt
@@ -5,5 +5,10 @@ if(OpenCV_FOUND)
otr_module(tracker-aruco)
target_link_libraries(opentrack-tracker-aruco opentrack-cv ${SDK_ARUCO_LIBPATH} ${OpenCV_LIBS})
target_include_directories(opentrack-tracker-aruco SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})
+
+ # no incremental LTO
+ if(MSVC AND MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1950)
+ otr_prop(TARGET opentrack-tracker-aruco LINK_FLAGS "/LTCG")
+ endif()
endif()
endif()
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 171e3f26..388eebe6 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -227,7 +227,7 @@ cv::Point3f aruco_tracker::rotate_model(float x, float y, settings::rot mode)
using std::cos;
using std::sin;
- const float theta = int(mode) * 90/4. * M_PI/180;
+ const double theta = int(mode) * 90/4. * M_PI/180;
pt.x = x * cos(theta) - y * sin(theta);
pt.y = y * cos(theta) + x * sin(theta);
}