forked from intel/AVB-AudioModules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.common.txt
executable file
·146 lines (113 loc) · 5.68 KB
/
CMakeLists.common.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Copyright (C) 2018 Intel Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#------------------------------------------------
# Common Settings
#------------------------------------------------
#------------------------------------------------
# ias-audio-common
#------------------------------------------------
add_library( ias-audio-common SHARED
private/src/common/IasAudioCommonTypes.cpp
private/src/common/IasAudioLogging.cpp
private/src/common/IasAlsaTypeConversion.cpp
private/src/common/IasDataProbe.cpp
private/src/common/IasDataProbeHelper.cpp
private/src/common/IasIntProcCondVar.cpp
private/src/common/IasIntProcMutex.cpp
private/src/common/IasFdSignal.cpp
private/src/common/IasCommonVersion.cpp
private/src/alsa_smartx_plugin/IasAlsaPluginShmConnection.cpp
private/src/audiobuffer/IasMemoryAllocator.cpp
private/src/audiobuffer/IasMetaDataFactory.cpp
private/src/audiobuffer/IasAudioRingBuffer.cpp
private/src/audiobuffer/IasAudioRingBufferTypes.cpp
private/src/audiobuffer/IasAudioRingBufferResult.cpp
private/src/audiobuffer/IasAudioRingBufferReal.cpp
private/src/audiobuffer/IasAudioRingBufferMirror.cpp
private/src/audiobuffer/IasAudioRingBufferFactory.cpp
private/src/samplerateconverter/IasSrcController.cpp
private/src/samplerateconverter/IasSrcFarrow.cpp
private/src/samplerateconverter/IasSrcFarrowFirFilter.cpp
private/src/samplerateconverter/IasSrcWrapper.cpp
private/src/helper/IasCopyAudioAreaBuffers.cpp
private/src/helper/IasIRunnable.cpp
private/src/helper/IasThread.cpp
)
set_target_properties( ias-audio-common PROPERTIES VERSION ${AUDIO_COMMON_VERSION_STRING} SOVERSION ${AUDIO_COMMON_VERSION_MAJOR} )
find_package(PkgConfig)
target_compile_options( ias-audio-common PUBLIC -ffast-math )
target_compile_options( ias-audio-common PUBLIC --std=c++11 )
target_compile_options( ias-audio-common PUBLIC -msse )
target_compile_options( ias-audio-common PUBLIC -msse2 )
target_compile_options( ias-audio-common PUBLIC -O3 )
# for version header
target_include_directories( ias-audio-common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} )
target_include_directories( ias-audio-common PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/private/inc )
target_include_directories( ias-audio-common PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/public/inc>
$<INSTALL_INTERFACE:public/inc> )
include_directories( ${DLT_INCLUDE_DIRS} )
pkg_check_modules(ASOUND REQUIRED alsa)
pkg_check_modules(SNDFILE REQUIRED sndfile)
pkg_check_modules(DLT REQUIRED automotive-dlt)
pkg_check_modules(DLT REQUIRED automotive-dlt-c++)
target_link_libraries( ias-audio-common tbb )
target_link_libraries( ias-audio-common boost_system )
target_link_libraries( ias-audio-common boost_filesystem )
target_link_libraries( ias-audio-common ${ASOUND_LDFLAGS} )
target_link_libraries( ias-audio-common ${SNDFILE_LDFLAGS} )
target_link_libraries( ias-audio-common ${DLT_LDFLAGS} )
target_compile_options( ias-audio-common PUBLIC ${ASOUND_CFLAGS_OTHER})
target_compile_options( ias-audio-common PUBLIC ${SNDFILE_CFLAGS_OTHER})
target_compile_options( ias-audio-common PUBLIC ${DLT_CFLAGS_OTHER})
target_include_directories( ias-audio-common PUBLIC ${ASOUND_INCLUDE_DIRS})
target_include_directories( ias-audio-common PUBLIC ${SNDFILE_INCLUDE_DIRS})
target_include_directories( ias-audio-common PUBLIC ${DLT_INCLUDE_DIRS})
install( TARGETS ias-audio-common EXPORT ias-audio-common
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Libraries
)
install( DIRECTORY public/inc/ DESTINATION include/avbaudiomodules
PATTERN "smartx_test_support" EXCLUDE )
install( EXPORT ias-audio-common DESTINATION ${CMAKE_INSTALL_LIBDIR}/ias-audio-common )
#------------------------------------------------
# alsa-smartx-plugin (libasound_module_pcm_smartx)
#------------------------------------------------
add_library( asound_module_pcm_smartx MODULE
private/src/alsa_smartx_plugin/IasAlsaSmartXPlugin.cpp
private/src/alsa_smartx_plugin/IasAlsaSmartXConnector.cpp
)
target_compile_options( asound_module_pcm_smartx PUBLIC --std=c++11 )
target_compile_options( asound_module_pcm_smartx PUBLIC -fPIC )
target_compile_options( asound_module_pcm_smartx PUBLIC -DPIC )
target_include_directories( asound_module_pcm_smartx PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/private/inc )
target_link_libraries( asound_module_pcm_smartx asound )
target_link_libraries( asound_module_pcm_smartx ${DLT_LDFLAGS} )
target_link_libraries( asound_module_pcm_smartx ias-audio-common )
install( TARGETS asound_module_pcm_smartx EXPORT asound_module_pcm_smartx
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}/alsa-lib
COMPONENT Libraries
)
install( FILES public/res/50-smartx.conf DESTINATION share/alsa/alsa.conf.d )
install( EXPORT asound_module_pcm_smartx DESTINATION ${CMAKE_INSTALL_LIBDIR}/ias-audio-common )
#------------------------------------------------
# alsa-smartx--rate-plugin (libasound_module_rate_smartx)
#------------------------------------------------
# ALSA rate plugin libasound_module_rate_smartx.so.
# This plugin represents the interface between ALSA and the sample rate converter
# provided by the SmartXBar.
#------------------------------------------------
add_library( asound_module_rate_smartx MODULE
private/src/samplerateconverter/IasAlsa.cpp
)
target_compile_options( asound_module_rate_smartx PUBLIC --std=c++11 )
target_link_libraries( asound_module_rate_smartx ias-audio-common )
install( TARGETS asound_module_rate_smartx EXPORT asound_module_rate_smartx
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}/alsa-lib
COMPONENT Libraries
)
install( EXPORT asound_module_rate_smartx DESTINATION ${CMAKE_INSTALL_LIBDIR}/ias-audio-common )