2019-11-10 22:35:07 +08:00
|
|
|
function(jkqtplotter_deployopencv TARGET_NAME)
|
|
|
|
if(OpenCV_FOUND)
|
2019-11-16 18:35:59 +08:00
|
|
|
if(WIN32)
|
2022-07-24 03:24:53 +08:00
|
|
|
if (EXISTS ${_OpenCV_LIB_PATH})
|
|
|
|
add_custom_command(TARGET ${EXENAME} POST_BUILD # Adds a post-build event the TARGET
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${_OpenCV_LIB_PATH}"
|
|
|
|
"$<TARGET_FILE_DIR:${EXENAME}>"
|
2019-11-16 18:35:59 +08:00
|
|
|
)
|
2022-07-24 03:24:53 +08:00
|
|
|
endif()
|
|
|
|
if (EXISTS ${OpenCV_INSTALL_PATH}/bin)
|
|
|
|
add_custom_command(TARGET ${EXENAME} POST_BUILD # Adds a post-build event the TARGET
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${OpenCV_INSTALL_PATH}/bin"
|
|
|
|
"$<TARGET_FILE_DIR:${EXENAME}>"
|
|
|
|
)
|
|
|
|
endif()
|
2019-11-16 18:35:59 +08:00
|
|
|
endif(WIN32)
|
|
|
|
endif(OpenCV_FOUND)
|
|
|
|
endfunction(jkqtplotter_deployopencv)
|