Skip to content

Commit

Permalink
added cmake interface dependency (pytorch#2684)
Browse files Browse the repository at this point in the history
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Francisco Massa <fvsmassa@gmail.com>
  • Loading branch information
3 people authored and vfdev-5 committed Dec 4, 2020
1 parent a7d9494 commit a721ea9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/TorchVisionConfig.cmake.in
Expand Up @@ -31,7 +31,9 @@ endif()
if(NOT TARGET Python3::Python)
find_package(Python3 COMPONENTS Development)
endif()
target_link_libraries(TorchVision::TorchVision INTERFACE ${TORCH_LIBRARIES} Python3::Python)

set_target_properties(TorchVision::TorchVision PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@" INTERFACE_LINK_LIBRARIES "torch;Python3::Python" )


if(@WITH_CUDA@)
target_compile_definitions(TorchVision::TorchVision INTERFACE WITH_CUDA)
Expand Down

0 comments on commit a721ea9

Please sign in to comment.