-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
28 lines (22 loc) · 1.03 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(cvtnet_libtorch)
SET(CMAKE_C_COMPILER g++)
# add_definitions(--std=c++14)
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
set(Torch_DIR /home/mjy/toytools/libtorch/libtorch-shared-with-deps-1.10.2+cu113/libtorch/share/cmake/Torch)
find_package(Torch REQUIRED)
message(STATUS "Torch library status:")
message(STATUS " version: ${TORCH_VERSION}")
message(STATUS " libraries: ${TORCH_LIBS}")
message(STATUS " include path: ${TORCH_INCLUDE_DIRS}")
message(STATUS " torch lib : ${TORCH_LIBRARIES} ")
message(STATUS " torch lib : ${TORCH_LIBRARIES} ")
# include_directories(${OpenCV_INCLUDE_DIRS} ${TORCH_INCLUDE_DIRS})
# add_executable(fast_ot fast_ot.cpp)
# target_link_libraries(fast_ot ${TORCH_LIBRARIES})
# set_property(TARGET fast_ot PROPERTY CXX_STANDARD 14)
add_executable(fast_cvtnet fast_cvtnet.cpp)
target_link_libraries(fast_cvtnet ${TORCH_LIBRARIES} ${PCL_LIBRARIES})