-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
75 lines (60 loc) · 1.31 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
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.10)
# Set the project name
project(proj)
# Specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Set to debug build type
set(CMAKE_BUILD_TYPE Debug)
# Find OpenGL
find_package(OpenGL REQUIRED)
# Find GLEW
find_package(GLEW REQUIRED)
# Find GLFW
find_package(glfw3 REQUIRED)
# Find PkgConfig
find_package(PkgConfig REQUIRED)
# Check FFmpeg modules
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET
libavdevice
libavfilter
libavformat
libavdevice
libavutil
libswresample
libswscale
libavcodec
)
# Include directories for OpenGL, GLEW, GLFW, and ImGui
include_directories(
${OPENGL_INCLUDE_DIRS}
${GLEW_INCLUDE_DIRS}
${GLFW_INCLUDE_DIRS}
imgui
lib
)
set(LIB_SRC
lib/desktop_capture.cpp
lib/shader_utils.cpp
lib/media_player.cpp
lib/UIManager.cpp
)
# Add ImGui source files
set(IMGUI_SRC
imgui/imgui.cpp
imgui/imgui_draw.cpp
imgui/imgui_tables.cpp
imgui/imgui_widgets.cpp
imgui/imgui_demo.cpp
imgui/imgui_impl_glfw.cpp
imgui/imgui_impl_opengl3.cpp
)
# Create the executable
add_executable(proj main.cpp ${IMGUI_SRC} ${LIB_SRC})
# Link the necessary libraries
target_link_libraries(proj
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
PkgConfig::LIBAV
glfw
)