summaryrefslogtreecommitdiffstats
path: root/soundserver/CMakeLists.txt
blob: 43954473aaf09a894ff5cd77118ceaab0b4a90e8 (plain)
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#################################################
#
#  (C) 2010 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

# FIXME pthread support need review

configure_file( artsversion-new.h.in artsversion.h )


set( MCOPINC
  -I${CMAKE_CURRENT_SOURCE_DIR} # for kmedia2.idl
  -I${CMAKE_SOURCE_DIR}/mcop
  -I${CMAKE_SOURCE_DIR}/flow
)

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_BINARY_DIR}
  ${CMAKE_BINARY_DIR}/flow
  ${CMAKE_SOURCE_DIR}/flow
  ${CMAKE_BINARY_DIR}/mcop
  ${CMAKE_SOURCE_DIR}/mcop
)


##### headers ###################################

install( FILES
    soundserver.idl kmedia2.idl
    ${CMAKE_CURRENT_BINARY_DIR}/artsversion.h
    ${CMAKE_CURRENT_BINARY_DIR}/soundserver.h
    ${CMAKE_CURRENT_BINARY_DIR}/kmedia2.h
  DESTINATION ${INCLUDE_INSTALL_DIR}/${CMAKE_PROJECT_NAME} )


##### other data ################################

install( FILES
    FileInputStream.mcopclass WavPlayObject.mcopclass
    GSLPlayObject.mcopclass
  DESTINATION ${LIB_INSTALL_DIR}/mcop/Arts )

install( FILES
    ${CMAKE_CURRENT_BINARY_DIR}/soundserver.mcopclass
    ${CMAKE_CURRENT_BINARY_DIR}/kmedia2.mcoptype
    ${CMAKE_CURRENT_BINARY_DIR}/kmedia2.mcopclass
    ${CMAKE_CURRENT_BINARY_DIR}/soundserver.mcoptype
  DESTINATION ${LIB_INSTALL_DIR}/mcop )


##### kmedia2_idl (shared lib) ##################

add_custom_command(
  OUTPUT kmedia2.cpp
  COMMAND ../mcopidl/mcopidl ARGS -t ${MCOPINC} ${CMAKE_CURRENT_SOURCE_DIR}/kmedia2.idl
  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kmedia2.idl
)

tde_add_library( kmedia2_idl SHARED
  SOURCES kmedia2.cpp
  VERSION 1.0.0
  LINK artsflow_idl-shared
  DESTINATION ${LIB_INSTALL_DIR}
  DEPENDENCIES mcopidl
)


##### soundserver_idl (shared lib) ##############

add_custom_command(
  OUTPUT soundserver.cpp soundserver.h
  COMMAND ../mcopidl/mcopidl ARGS -t ${MCOPINC} ${CMAKE_CURRENT_SOURCE_DIR}/soundserver.idl
  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/soundserver.idl
)

tde_add_library( soundserver_idl SHARED
  SOURCES soundserver.cpp
  VERSION 1.0.0
  LINK kmedia2_idl-shared
  DESTINATION ${LIB_INSTALL_DIR}
  DEPENDENCIES mcopidl
)


##### artsgslplayobject (shared lib) ############

tde_add_library( artsgslplayobject SHARED
  SOURCES gslplayobject_impl.cpp
  VERSION 0.0.0
  LINK soundserver_idl-shared artsflow-shared
  DESTINATION ${LIB_INSTALL_DIR}
)


##### artswavplayobject (shared lib) ############

tde_add_library( artswavplayobject SHARED
  SOURCES wavplayobject_impl.cpp
  VERSION 0.0.0
  LINK soundserver_idl-shared artsflow-shared
  DESTINATION ${LIB_INSTALL_DIR}
)


##### kmedia2 (shared lib) ######################

tde_add_library( kmedia2 SHARED
  SOURCES fileinputstream_impl.cpp stdoutwriter_impl.cpp
  VERSION 1.0.0
  LINK kmedia2_idl-shared artsflow-shared
  DESTINATION ${LIB_INSTALL_DIR}
)


##### artsd #####################################

set( target artsd )

set( ${target}_SRCS
  soundserverv2_impl.cpp soundserver_impl.cpp simplesoundserver_impl.cpp
  artsd.cpp cpuusage.cpp samplestorage_impl.cpp crashhandler.cpp
  soundserverstartup_impl.cpp
)

tde_add_executable( ${target}
  SOURCES ${${target}_SRCS}
  LINK soundserver_idl-shared artsflow-shared
  DESTINATION ${BIN_INSTALL_DIR}
)


##### artsplay ##################################

tde_add_executable( artsplay
  SOURCES artsplay.cpp
  LINK soundserver_idl-shared
  DESTINATION ${BIN_INSTALL_DIR}
)


##### artscat ###################################

tde_add_executable( artscat
  SOURCES artscat.cpp
  LINK soundserver_idl-shared artsflow-shared
  DESTINATION ${BIN_INSTALL_DIR}
)


##### artswrapper ###############################

tde_add_executable( artswrapper
  SOURCES artswrapper.c
  DESTINATION ${BIN_INSTALL_DIR}
)

# FIXME "artsdpath" seems inconsistent name
# necessary for artswrapper
SET( artsdpath  ${BIN_INSTALL_DIR}/artsd )
set_property( TARGET artswrapper APPEND PROPERTY COMPILE_DEFINITIONS EXECUTE="${artsdpath}" )


##### artsshell #################################

tde_add_executable( artsshell
  SOURCES artsshell.cpp tradercheck.cpp
  LINK soundserver_idl-shared
  DESTINATION ${BIN_INSTALL_DIR}
)


##### artsrec ###################################

tde_add_executable( artsrec
  SOURCES artsrec.cpp
  LINK soundserver_idl-shared artsflow-shared
  DESTINATION ${BIN_INSTALL_DIR}
)