summaryrefslogtreecommitdiffstats
path: root/flow/CMakeLists.txt
blob: 2f7325c0bb84812d5436f52b0305ab4aee0351c1 (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
#################################################
#
#  (C) 2010 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

add_subdirectory( mcopclass )
add_subdirectory( gsl )
add_subdirectory( gslpp )

set( artsflow_INCS
  ${CMAKE_CURRENT_BINARY_DIR}/artsflow.h
  audiosubsys.h
  cache.h
  cachedwav.h
  convert.h
  pipebuffer.h
  stdsynthmodule.h
  synthschedule.h
  fft.h
  artsflow.idl
  audioio.h
  resample.h
  cpuinfo.h
  bufferqueue.h
  gslschedule.h
)

set( artsflow_SRCS
  synth_play_impl.cc
  gslschedule.cc
  audiosubsys.cc
  pipebuffer.cc
  convert.cc
  synth_wave_sin_impl.cc
  synth_frequency_impl.cc
  synth_multi_add_impl.cc
  synth_add_impl.cc
  synth_mul_impl.cc
  synth_play_wav_impl.cc
  stdsynthmodule.cc
  cache.cc
  asyncschedule.cc
  bytestreamtoaudio_impl.cc
  stereovolumecontrol_impl.cc
  stereoeffectstack_impl.cc
  fft.c
  stereofftscope_impl.cc
  virtualports.cc
  bus.cc
  audiomanager_impl.cc
  synth_record_impl.cc
  resample.cc
  audioio.cc
  audioiooss.cc
  audioioalsa.cc
  audioioalsa9.cc
  audioionull.cc
  audioiolibaudioio.cc
  audioioesd.cc
  audioiojack.cc
  audioiosun.cc
  audioioaix.cc
  audioionas.cc
  cpuinfo.cc
  audioioossthreaded.cc
  audiotobytestream_impl.cc
  audioiosgi.cc
  audioiocsl.cc
  audioiomas.cc
  datahandle_impl.cc
)

include_directories(
  ${CMAKE_BINARY_DIR} # for config.h
  ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
  ${CMAKE_SOURCE_DIR}/mcop # for common.h
  ${CMAKE_CURRENT_BINARY_DIR} # for gsl/gslconfig.h
  ${CMAKE_CURRENT_SOURCE_DIR} # for gsl/gsldefs.h
  ${GLIB2_INCLUDE_DIRS} # for glib.h
)

add_definitions(
  -DHAVE_CONFIG_H
)

##### artsflow_idl

add_custom_command(
  OUTPUT artsflow.cc
  COMMAND ../mcopidl/mcopidl
  ARGS -t ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl
)

set( artsflow_idl_SRCS artsflow.cc )
add_library( artsflow_idl SHARED ${artsflow_idl_SRCS} )
set_target_properties( artsflow_idl PROPERTIES VERSION 1.0 SOVERSION 1 )
target_link_libraries( artsflow_idl mcop ${ALSA_LIBRARY} )
add_dependencies( artsflow_idl mcopidl )

##### artsflow

add_library( artsflow SHARED ${artsflow_SRCS} )
set_target_properties( artsflow PROPERTIES VERSION 1.0 SOVERSION 1 )

target_link_libraries( artsflow
  artsflow_idl
  mcop
  gslpp
  gsl
  ${AUDIOFILE_LIBRARIES}
)



##### install ###################################

install( FILES ${artsflow_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
install( TARGETS artsflow_idl artsflow LIBRARY DESTINATION ${LIB_INSTALL_DIR} )