-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (55 loc) · 1.5 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.20)
project(
SECURITY_SYSTEM
VERSION 1.0.0
LANGUAGES C CXX
)
set(SOURCES
main.cpp
src/alert.cpp
src/camera.cpp
src/detect_person.cpp
src/select_area.cpp
src/main_window.cpp
)
include_directories(include)
# include OpenCV library
find_package(OpenCV REQUIRED)
message(STATUS "OpenCV Version: " ${OpenCV_VERSION})
include_directories(${OpenCV_INCLUDE_DIRS})
# irrKlang Library
include_directories(lib/irrKlang/include)
set(IRRKLANG_DLL_PATH ${CMAKE_SOURCE_DIR})
# adding ncnn header files
include_directories(
C:/ncnn/src
C:/ncnn/build/src
)
# linking options for ncnn library
add_link_options(-fopenmp -s -lpthread)
# adding glfw library
set(GLFW_BUILD_DOCS OFF CACHE BOOL "GLFW lib only")
set(GLFW_INSTALL OFF CACHE BOOL "GLFW lib only")
add_subdirectory(lib/glfw)
include_directories(${CMAKE_SOURCE_DIR}/lib/glfw/include/)
# adding OpenGL Library
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS})
# adding glew library
include_directories(${CMAKE_SOURCE_DIR}/lib/glew/include/)
find_library(GLEWLIB libglew32 ${CMAKE_SOURCE_DIR}/lib/glew/lib/)
# adding ImGui Library
add_subdirectory(lib/imgui)
include_directories(${CMAKE_SOURCE_DIR}/lib/imgui)
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(
${PROJECT_NAME}
${IRRKLANG_DLL_PATH}/lib/irrKlang/bin/win32-gcc/irrKlang.dll
Wininet
${OpenCV_LIBS}
C:/ncnn/build/src/libncnn.a
${OPENGL_LIBRARIES}
${GLEWLIB}
glfw
imgui
)