-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (30 loc) · 1.35 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# CMakeLists.txt
# CMake version that the current computer is using
cmake_minimum_required(VERSION "3.23")
# name of the project
project(shooting_score)
# set OpenCV_DIR variable equal to the path to the cmake
# files within the previously installed opencv program
set(OpenCV_DIR /opt/homebrew/Cellar/opencv/4.11.0_1/include/opencv4)
# Tell compiler to use C++ 14 features which is needed because
# Clang version is often behind in the XCode installation
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.0)
# set working directory
set(SOURCE_DIR src)
# configure the necessary common CMake environment variables
# needed to include and link the OpenCV program into this
# demo project, namely OpenCV_INCLUDE_DIRS and OpenCV_LIBS
find_package(OpenCV REQUIRED)
# tell the build to include the headers from OpenCV
include_directories(${OpenCV_INCLUDE_DIRS} ${SOURCE_DIR})
# add library that compute shooting score
add_library(ShotTracking ${SOURCE_DIR}/ShotTracking.cpp)
add_library(ImageAlignment ${SOURCE_DIR}/ImageAlignment.cpp)
add_library(util ${SOURCE_DIR}/util.cpp)
# specify the executable target to be built
add_executable(main main.cpp)
target_link_libraries(ShotTracking util)
target_link_libraries(ImageAlignment util)
# tell it to link the executable target against OpenCV
target_link_libraries(main ${OpenCV_LIBS} util ShotTracking ImageAlignment)