forked from ChanWoo25/SuperPoint2CPP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_CMakeLists.txt
47 lines (39 loc) · 994 Bytes
/
_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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.8)
project(
SuperPointCpp
LANGUAGES CXX
VERSION 20.08
)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/home/leecw/libtorch")
find_package(Torch REQUIRED)
find_package(OpenCV 3.0 QUIET)
if(OpenCV_FOUND)
message(STATUS "OpenCV >= 3.0 found.")
else()
message(STATUS "OpenCV cannot be found.")
endif()
message(STATUS ${PROJECT_SOURCE_DIR})
message(STATUS ${CMAKE_SOURCE_DIR})
#message(STATUS ${TORCH_LIBRARIES})
# TEST
add_executable(test test_main.cpp test.cpp)
target_compile_features(test PRIVATE cxx_std_14)
target_include_directories(test
PUBLIC
${PROJECT_SOURCE_DIR}/include
)
target_link_libraries(test
${TORCH_LIBRARIES}
${OpenCV_LIBS}
)
# SUPERPOINT
add_executable(SuperPoint main.cpp ./src/SuperPoint.cpp ./src/Extractor.cpp)
target_compile_features(SuperPoint PRIVATE cxx_std_14)
target_include_directories(SuperPoint
PUBLIC
${PROJECT_SOURCE_DIR}/include
)
target_link_libraries(SuperPoint
${TORCH_LIBRARIES}
${OpenCV_LIBS}
)