"examples/vscode:/vscode.git/clone" did not exist on "bf7ee0f4d4ce60638d4b0d15d5eb51401b05f1a7"
TorchVisionConfig.cmake.in 1.16 KB
Newer Older
bmanga's avatar
bmanga committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# TorchVisionConfig.cmake
# --------------------
#
# Exported targets:: Vision
#

@PACKAGE_INIT@

set(PN TorchVision)

# location of include/torchvision
set(${PN}_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")

set(${PN}_LIBRARY "")
set(${PN}_DEFINITIONS USING_${PN})

check_required_components(${PN})


if(NOT (CMAKE_VERSION VERSION_LESS 3.0))
#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
# project which has already built this as a subproject
#-----------------------------------------------------------------------------
if(NOT TARGET ${PN}::TorchVision)
include("${CMAKE_CURRENT_LIST_DIR}/${PN}Targets.cmake")

if(NOT TARGET torch_library)
find_package(Torch REQUIRED)
endif()
31
32
if(NOT TARGET Python3::Python)
find_package(Python3 COMPONENTS Development)
bmanga's avatar
bmanga committed
33
endif()
34
35
36

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

bmanga's avatar
bmanga committed
37

38
39
40
41
if(@WITH_CUDA@)
  target_compile_definitions(TorchVision::TorchVision INTERFACE WITH_CUDA)
endif()

bmanga's avatar
bmanga committed
42
43
endif()
endif()