File: CMakeLists.txt

package info (click to toggle)
pytorch-vision 0.21.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 20,228 kB
  • sloc: python: 65,904; cpp: 11,406; ansic: 2,459; java: 550; sh: 265; xml: 79; objc: 56; makefile: 33
file content (23 lines) | stat: -rw-r--r-- 640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required(VERSION 3.4.1)
set(TARGET torchvision_ops)
project(${TARGET} CXX)
set(CMAKE_CXX_STANDARD 17)
set(LIBTORCH_HEADER_ROOT ${LIBTORCH_HEADER_ROOT})
set(LIBRARY_OUTPUT_PATH ../lib)

file(GLOB VISION_SRCS
    ../torchvision/csrc/ops/cpu/*.h
    ../torchvision/csrc/ops/cpu/*.cpp
    ../torchvision/csrc/ops/*.h
    ../torchvision/csrc/ops/*.cpp)

add_library(${TARGET} STATIC
  ${VISION_SRCS}
)

file(GLOB PYTORCH_HEADERS "${LIBTORCH_HEADER_ROOT}")
file(GLOB PYTORCH_HEADERS_CSRC "${LIBTORCH_HEADER_ROOT}/torch/csrc/api/include")
target_include_directories(${TARGET} PRIVATE
  ${PYTORCH_HEADERS}
  ${PYTORCH_HEADERS_CSRC}
)