orb_slam3_details/Thirdparty/DBoW2/CMakeLists.txt

41 lines
952 B
CMake
Raw Normal View History

2020-12-01 11:58:17 +08:00
cmake_minimum_required(VERSION 2.8)
project(DBoW2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -march=native ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=native")
set(HDRS_DBOW2
DBoW2/BowVector.h
DBoW2/FORB.h
DBoW2/FClass.h
DBoW2/FeatureVector.h
DBoW2/ScoringObject.h
DBoW2/TemplatedVocabulary.h)
set(SRCS_DBOW2
DBoW2/BowVector.cpp
DBoW2/FORB.cpp
DBoW2/FeatureVector.cpp
DBoW2/ScoringObject.cpp)
set(HDRS_DUTILS
DUtils/Random.h
DUtils/Timestamp.h)
set(SRCS_DUTILS
DUtils/Random.cpp
DUtils/Timestamp.cpp)
2021-08-09 19:34:51 +08:00
find_package(OpenCV 4.0 QUIET)
2020-12-01 11:58:17 +08:00
if(NOT OpenCV_FOUND)
2021-08-09 19:34:51 +08:00
find_package(OpenCV 3.0 QUIET)
2020-12-01 11:58:17 +08:00
if(NOT OpenCV_FOUND)
2021-08-09 19:34:51 +08:00
message(FATAL_ERROR "OpenCV > 3.0 not found.")
2020-12-01 11:58:17 +08:00
endif()
endif()
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
include_directories(${OpenCV_INCLUDE_DIRS})
add_library(DBoW2 SHARED ${SRCS_DBOW2} ${SRCS_DUTILS})
target_link_libraries(DBoW2 ${OpenCV_LIBS})