-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
95 lines (77 loc) · 2.72 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
cmake_minimum_required(VERSION 3.7)
project(audio)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-c
-Wall
-Wextra
-Winit-self
-Woverloaded-virtual
-Wuninitialized
-pedantic
-g
)
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON)
find_package(PkgConfig REQUIRED)
if ( NOT (PKGCONFIG_FOUND))
message(FATAL_ERROR "Please Install PPkgConfig: CMake will Exit")
endif()
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.2)
if ( NOT (GST_FOUND))
message(FATAL_ERROR "Please Install Gstreamer Dev: CMake will Exit")
endif()
set(ENV{PKG_CONFIG_PATH})
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
if ( NOT (Qt5_FOUND))
message(FATAL_ERROR "Please Install Qt Dev: CMake will Exit")
endif()
#find_package(Boost 1.67)
# local cmake scripts
#list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
#find_package(ZMQ REQUIRED)
include_directories("${GST_INCLUDE_DIRS}")
link_libraries(${GST_LIBRARIES})
include_directories( ${Boost_INCLUDE_DIRS} )
#include_directories(${ZMQ_INCLUDE_DIRS})
set (CLIENT
client/client-main.cpp
client/client-audio.cpp
client/client-audio-local-mp3.cpp
client/client-audio-udp-file.cpp
client/client-audio-udp-live.cpp
client/client-audio-controller.cpp
media/media.cpp
media/messageBus.cpp
client/client-communication-with-headquarters.cpp
client/client-communication-controller-with-headquarters.cpp
media/communication-state.cpp
client/client-qt-controller.cpp
qt/qml.qrc
)
add_executable(${PROJECT_NAME}-client ${CLIENT} )
target_link_libraries(${PROJECT_NAME}-client ${GST_LIBRARIES})
target_link_libraries(${PROJECT_NAME}-client zmq)
target_link_libraries(${PROJECT_NAME}-client Qt5::Core Qt5::Quick)
set (HEADQUARTERS
headquarters/headquarters-main.cpp
headquarters/headquarters-audio-processing.cpp
headquarters/headquarters-controler.cpp
media/media.cpp
media/messageBus.cpp
headquarters/headquarters-communication.cpp
media/communication-state.cpp
headquarters/headquarters-communication-controller.cpp)
include_directories(media)
add_executable(${PROJECT_NAME}-headquarters ${HEADQUARTERS})
target_link_libraries(${PROJECT_NAME}-headquarters ${GST_LIBRARIES})
target_link_libraries(${PROJECT_NAME}-headquarters zmq)
set (TESTS_SRC_LISTS
client-tests/test-main.cpp
client-tests/test-communication-state.cpp
media/communication-state.cpp
)
add_executable(${PROJECT_NAME}-client-tests ${TESTS_SRC_LISTS})
target_link_libraries(${PROJECT_NAME}-client-tests zmq)