Skip to content
Snippets Groups Projects
Commit ac6898a0 authored by Jinhui Yuan's avatar Jinhui Yuan Committed by Will Zhang
Browse files

Fix opencv (#910)

* let opencv depend on libjpeg-turbo

* fix libjpeg-turbo dependency
parent 0a3adeae
No related branches found
No related tags found
No related merge requests found
......@@ -89,8 +89,6 @@ set(oneflow_third_party_dependencies
grpc_copy_headers_to_destination
grpc_copy_libs_to_destination
cub_copy_headers_to_destination
libjpeg_copy_headers_to_destination
libjpeg_copy_libs_to_destination
opencv_copy_headers_to_destination
opencv_copy_libs_to_destination
eigen
......
......@@ -63,7 +63,8 @@ ExternalProject_Add(libjpeg-turbo
# put libjpeg-turbo includes in the directory where they are expected
add_custom_target(libjpeg_create_header_dir
COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBJPEG_INCLUDE_DIR})
COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBJPEG_INCLUDE_DIR}
DEPENDS libjpeg-turbo)
add_custom_target(libjpeg_copy_headers_to_destination
DEPENDS libjpeg_create_header_dir)
......@@ -76,7 +77,7 @@ endforeach()
# pub libjpeg libs in the directory where they are expected
add_custom_target(libjpeg_create_library_dir
COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBJPEG_LIBRARY_DIR}
DEPENDS zlib)
DEPENDS libjpeg-turbo)
add_custom_target(libjpeg_copy_libs_to_destination
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIBJPEG_BUILD_STATIC_LIBRARIES} ${LIBJPEG_LIBRARY_DIR}
......
......@@ -32,6 +32,7 @@ endforeach()
if (BUILD_THIRD_PARTY)
ExternalProject_Add(opencv
DEPENDS libjpeg_copy_headers_to_destination libjpeg_copy_libs_to_destination
PREFIX opencv
GIT_REPOSITORY ${OPENCV_URL}
GIT_TAG ${OPENCV_TAG}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment