Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

TorchVisionConfig.cmake.in 1.3 KB

You have to be logged in to leave a comment. Sign In
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  1. # TorchVisionConfig.cmake
  2. # --------------------
  3. #
  4. # Exported targets:: Vision
  5. #
  6. @PACKAGE_INIT@
  7. set(PN TorchVision)
  8. # location of include/torchvision
  9. set(${PN}_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
  10. set(${PN}_LIBRARY "")
  11. set(${PN}_DEFINITIONS USING_${PN})
  12. check_required_components(${PN})
  13. if(NOT (CMAKE_VERSION VERSION_LESS 3.0))
  14. #-----------------------------------------------------------------------------
  15. # Don't include targets if this file is being picked up by another
  16. # project which has already built this as a subproject
  17. #-----------------------------------------------------------------------------
  18. if(NOT TARGET ${PN}::${PN})
  19. include("${CMAKE_CURRENT_LIST_DIR}/${PN}Targets.cmake")
  20. target_include_directories(${PN}::${PN} INTERFACE "${${PN}_INCLUDE_DIR}")
  21. if(@WITH_CUDA@)
  22. target_compile_definitions(${PN}::${PN} INTERFACE WITH_CUDA)
  23. endif()
  24. find_package(Torch REQUIRED)
  25. target_link_libraries(${PN}::${PN} INTERFACE torch)
  26. if(@WITH_PNG@)
  27. find_package(PNG REQUIRED)
  28. target_link_libraries(${PN}::${PN} INTERFACE ${PNG_LIBRARY})
  29. target_compile_definitions(${PN}::${PN} INTERFACE PNG_FOUND)
  30. endif()
  31. if(@WITH_JPEG@)
  32. find_package(JPEG REQUIRED)
  33. target_link_libraries(${PN}::${PN} INTERFACE ${JPEG_LIBRARIES})
  34. target_compile_definitions(${PN}::${PN} INTERFACE JPEG_FOUND)
  35. endif()
  36. endif()
  37. endif()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...