You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
cmake_minimum_required(VERSION 3.15.0)
|
|
project(stitch VERSION 0.1.0)
|
|
|
|
set(CMAKE_CXX_STANDARD 11) # 或更高版本
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
|
SET(ArithStitchDir stitch)
|
|
|
|
|
|
IF(WIN32)
|
|
set(OpenCV_DIR "./3rdParty")
|
|
|
|
# 设置OpenCV头文件路径
|
|
set(OpenCV_INCLUDE_DIRS ${OpenCV_DIR}/include)
|
|
set(OpenCV_LIBS_DIR ${OpenCV_DIR}/lib)
|
|
link_directories(${OpenCV_LIBS_DIR})
|
|
# 设置OpenCV库文件
|
|
set(OpenCV_LIBS opencv_world455)
|
|
ELSE(WIN32)
|
|
find_package(OpenCV REQUIRED)
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
include_directories(${OpenCV_INCLUDE_DIRS} public_include ${ArithStitchDir}/src)
|
|
|
|
# 设置算法库目录
|
|
SET(LIB_STITCH GuideStitch)
|
|
|
|
add_subdirectory(stitch)
|
|
|
|
add_executable(stitch main.cpp)
|
|
|
|
target_link_libraries(stitch ${OpenCV_LIBS} ${LIB_STITCH})
|
|
|
|
|
|
add_executable(stitch_DJ "ProcDJ.cpp")
|
|
target_link_libraries(stitch_DJ ${OpenCV_LIBS} ${LIB_STITCH})
|
|
|
|
|
|
|
|
add_executable(stitch_Fea "feaStitchTest.cpp")
|
|
target_link_libraries(stitch_Fea ${OpenCV_LIBS} ${LIB_STITCH})
|
|
|
|
|
|
|
|
|
|
# 可执行文件输出路径
|
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/Bin)
|