-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (53 loc) · 1.7 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
cmake_minimum_required(VERSION 3.18)
project(Recorder)
set(CMAKE_CXX_STANDARD 17)
# Add subdirectories
add_subdirectory(ui)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
find_library(UV_A NAMES uv_a uv PATHS /usr/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/aarch64-linux-gnu /lib/aarch64-linux-gnu)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
# Specify the path to uSockets.a
set(USOCKETS_LIB_PATH /usr/local/lib/uSockets.a)
# Find PulseAudio package
find_package(PkgConfig REQUIRED)
pkg_check_modules(PULSEAUDIO REQUIRED libpulse)
# Add AddressSanitizer flags
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -fsanitize=address -fno-omit-frame-pointer")
# Add the executable
add_executable(${PROJECT_NAME}
src/main.cpp
include/miniaudio.h
src/recording/baseRecorder.h
src/recording/audio/audioRecorder.cpp
src/recording/audio/audioRecorder.h
src/dashboard/dashboard.cpp
src/dashboard/dashboard.h
src/dashboard/cpu/CpuInfo.h
src/recording/recorders.h
src/dashboard/app.h
include/sha512.h
src/dashboard/auth/auth.h
src/dashboard/auth/auth.cpp
src/dashboard/auth/auth.h
src/dashboard/auth/auth.cpp
src/dashboard/auth/auth.h
)
# Include directories
target_include_directories(${PROJECT_NAME} PRIVATE
include
${PULSEAUDIO_INCLUDE_DIRS}
)
# Link against required libraries
target_link_libraries(${PROJECT_NAME} PUBLIC
${UV_A}
${USOCKETS_LIB_PATH}
pthread
${PULSEAUDIO_LIBRARIES}
z
m
dl
)
# Add dependency on ui target
add_dependencies(${PROJECT_NAME} ui)
file(GLOB MISC_FILES misc/*)
file(COPY ${MISC_FILES} DESTINATION ${CMAKE_BINARY_DIR})