-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
38 lines (31 loc) · 861 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(AudioRecorder)
set(CMAKE_CXX_STANDARD 14)
IF (WIN32)
MESSAGE(STATUS "Platform is Windows")
add_definitions(-DWINDOWS)
ELSEIF (APPLE)
MESSAGE(STATUS "Platform is MacOS")
add_definitions(-DMACOS)
include_directories(/usr/local/include/)
link_directories(/usr/local/lib/)
ELSEIF (UNIX)
MESSAGE(STATUS "Platform is UNIX")
add_definitions(-DUNIX)
ENDIF ()
add_executable(AudioRecorder main.cpp AudioRecorder.cpp AudioRecorder.h ffmpeg.h ListAVDevices.cpp ListAVDevices.h AudioPlayer.cpp AudioPlayer.h)
target_link_libraries(
AudioRecorder
avcodec
avdevice
avfilter
avformat
avutil
postproc
swresample
swscale
SDL2
)
IF(CMAKE_SYSTEM MATCHES Linux)
target_link_libraries(${PROJECT_NAME} pthread)
ENDIF()