Skip to content
Snippets Groups Projects
Commit a72fedb5 authored by d.kilic's avatar d.kilic
Browse files

Don't apply mapping of OpenCV debug to release on MSVC

Since OpenCV is quite slow in debug, we always link against the release version. This does not work with MSVC due to incompatible crt's. Therefore, we don't do it on MSVC and have to live with the slowness...
parent 0bc3f8a6
No related branches found
No related tags found
1 merge request!292Resolve "Debug under MSVC linker Error"
...@@ -241,9 +241,13 @@ target_include_directories(petrack_core PRIVATE "${CMAKE_SOURCE_DIR}/ui") ...@@ -241,9 +241,13 @@ target_include_directories(petrack_core PRIVATE "${CMAKE_SOURCE_DIR}/ui")
# Linking OpenCV * # Linking OpenCV *
#***************************************************************** #*****************************************************************
# Debug Version of slows our debug down to a unusable degree # Debug Version of slows our debug down to a unusable degree
set_target_properties(${OpenCV_LIBS} PROPERTIES # so link to release always (not possible on MSVC due to
MAP_IMPORTED_CONFIG_DEBUG RELEASE # debug crt and release crt not being compatible)
MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE) if(NOT ${MSVC})
set_target_properties(${OpenCV_LIBS} PROPERTIES
MAP_IMPORTED_CONFIG_DEBUG RELEASE
MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
endif()
target_link_libraries(petrack_core PUBLIC ${OpenCV_LIBS}) target_link_libraries(petrack_core PUBLIC ${OpenCV_LIBS})
#***************************************************************** #*****************************************************************
# Linking QWT * # Linking QWT *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment