Browse Source

[dependencies/arts] restyle and migrate to tde_ macrossoundserver/CMakeLists.txt

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1183226 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
samelian 8 years ago
parent
commit
4388c9f844

+ 5
- 0
CMakeLists.txt View File

@@ -12,6 +12,11 @@
12 12
 cmake_minimum_required( VERSION 2.6 )
13 13
 
14 14
 
15
+##### include our cmake modules #################
16
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
17
+include( TDEMacros )
18
+
19
+
15 20
 ##### project settings ##########################
16 21
 
17 22
 project( arts )

+ 43
- 46
artsc/CMakeLists.txt View File

@@ -28,76 +28,73 @@ endforeach(INC)
28 28
 
29 29
 configure_file( artsc-config.in artsc-config @ONLY )
30 30
 configure_file( artsc_export.h.in artsc_export.h @ONLY )
31
-
32
-set( FLOWLIBS artsflow )
33
-
34
-set( artsc_INCS
35
-  artsc.h
36
-  artsc_export.h
37
-)
31
+install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/artsc-config DESTINATION ${BIN_INSTALL_DIR} )
38 32
 
39 33
 add_definitions(
40 34
   -DCOMPILING_ARTSC
41 35
 )
42 36
 
37
+
38
+##### include paths #############################
39
+
43 40
 include_directories(
44
-  ${CMAKE_CURRENT_BINARY_DIR} # for artsc_export.h
45
-  ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
46
-  ${CMAKE_SOURCE_DIR}/mcop # for common.h
47
-  ${CMAKE_BINARY_DIR}/flow # for artsflow.h
48
-  ${CMAKE_SOURCE_DIR}/flow # for stdsynthmodule.h
49
-  ${CMAKE_BINARY_DIR}/soundserver # for soundserver.h
41
+  ${CMAKE_CURRENT_BINARY_DIR}
42
+  ${CMAKE_BINARY_DIR}
43
+  ${CMAKE_BINARY_DIR}/mcop
44
+  ${CMAKE_SOURCE_DIR}/mcop
45
+  ${CMAKE_BINARY_DIR}/flow
46
+  ${CMAKE_SOURCE_DIR}/flow
47
+  ${CMAKE_BINARY_DIR}/soundserver
50 48
 )
51 49
 
52
-##### libartsdsp ################################
53 50
 
54
-set( artsdsp_SRCS
55
-  artsdsp.c
56
-)
51
+##### headers ###################################
57 52
 
58
-add_library( artsdsp SHARED ${artsdsp_SRCS} )
59
-set_target_properties( artsdsp PROPERTIES VERSION 0.0 SOVERSION 0 )
60
-target_link_libraries( artsdsp artsc )
53
+# FIXME these header must be installed?
54
+#install( FILES
55
+#    artsc.h artsc_export.h
56
+#  DESTINATION ${INCLUDE_INSTALL_DIR} )
61 57
 
62 58
 
63
-##### libartsdsp_st #############################
59
+##### artsdsp (shared lib) ######################
64 60
 
65
-set( artsdsp_st_SRCS
66
-  artsc.c
67
-  artsdsp.c
61
+tde_add_library( artsdsp SHARED
62
+  SOURCES artsdsp.c
63
+  VERSION 0.0.0
64
+  LINK artsc-shared
65
+  DESTINATION ${LIB_INSTALL_DIR}
68 66
 )
69 67
 
70
-add_library( artsdsp_st SHARED ${artsdsp_st_SRCS} )
71
-set_target_properties( artsdsp_st PROPERTIES VERSION 0.0 SOVERSION 0 )
72
-set_target_properties( artsdsp_st PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
73
-target_link_libraries( artsdsp_st ltdlc )
74
-
75 68
 
76
-##### libartsc ##################################
69
+##### artsdsp_st (shared lib) ###################
77 70
 
78
-set( artsc_SRCS
79
-  artsc.c
71
+tde_add_library( artsdsp_st SHARED
72
+  SOURCES artsc.c artsdsp.c
73
+  VERSION 0.0.0
74
+  LINK ltdlc-static
75
+  DESTINATION ${LIB_INSTALL_DIR}
80 76
 )
81 77
 
82
-add_library( artsc SHARED ${artsc_SRCS} )
83
-set_target_properties( artsc PROPERTIES VERSION 0.0 SOVERSION 0 )
84
-set_target_properties( artsc PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
85
-target_link_libraries( artsc ltdlc ${LIBPTHREAD} )
78
+set_target_properties( artsdsp_st-shared PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
86 79
 
87 80
 
88
-##### libartscbackend ###########################
81
+##### artsc (shared lib) ########################
89 82
 
90
-set( artscbackend_SRCS
91
-  artscbackend.cc
83
+tde_add_library( artsc SHARED
84
+  SOURCES artsc.c
85
+  VERSION 0.0.0
86
+  LINK ltdlc-static
87
+  DESTINATION ${LIB_INSTALL_DIR}
92 88
 )
93 89
 
94
-add_library( artscbackend SHARED ${artscbackend_SRCS} )
95
-set_target_properties( artscbackend PROPERTIES VERSION 0.0 SOVERSION 0 )
96
-target_link_libraries( artscbackend ${FLOWLIBS} soundserver_idl )
90
+set_target_properties( artsc-shared PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
97 91
 
98 92
 
99
-##### install ###################################
93
+##### artscbackend (shared lib) #################
100 94
 
101
-#install( FILES ${artsc_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
102
-install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/artsc-config DESTINATION ${BIN_INSTALL_DIR} )
103
-install( TARGETS artsdsp artsdsp_st artsc artscbackend LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
95
+tde_add_library( artscbackend SHARED
96
+  SOURCES artscbackend.cc
97
+  VERSION 0.0.0
98
+  LINK soundserver_idl-shared artsflow-shared
99
+  DESTINATION ${LIB_INSTALL_DIR}
100
+)

+ 1
- 0
config.h.cmake View File

@@ -10,6 +10,7 @@
10 10
 #cmakedefine HAVE_DLFCN_H 1
11 11
 
12 12
 #cmakedefine HAVE_LIBDL 1
13
+#define LTDL_OBJDIR "."
13 14
 
14 15
 #cmakedefine HAVE_DLERROR 1
15 16
 #cmakedefine HAVE_STRCMP 1

+ 48
- 94
flow/CMakeLists.txt View File

@@ -13,83 +13,55 @@ add_subdirectory( mcopclass )
13 13
 add_subdirectory( gsl )
14 14
 add_subdirectory( gslpp )
15 15
 
16
-set( artsflow_INCS
17
-  ${CMAKE_CURRENT_BINARY_DIR}/artsflow.h
18
-  audiosubsys.h
19
-  cache.h
20
-  cachedwav.h
21
-  convert.h
22
-  pipebuffer.h
23
-  stdsynthmodule.h
24
-  synthschedule.h
25
-  fft.h
26
-  artsflow.idl
27
-  audioio.h
28
-  resample.h
29
-  cpuinfo.h
30
-  bufferqueue.h
31
-  gslschedule.h
16
+include_directories(
17
+  ${CMAKE_BINARY_DIR}
18
+  ${CMAKE_BINARY_DIR}/mcop
19
+  ${CMAKE_SOURCE_DIR}/mcop
20
+  ${CMAKE_CURRENT_BINARY_DIR}
21
+  ${CMAKE_CURRENT_SOURCE_DIR}
22
+  ${GLIB2_INCLUDE_DIRS}
32 23
 )
33 24
 
34
-set( artsflow_SRCS
35
-  synth_play_impl.cc
36
-  gslschedule.cc
37
-  audiosubsys.cc
38
-  pipebuffer.cc
39
-  convert.cc
40
-  synth_wave_sin_impl.cc
41
-  synth_frequency_impl.cc
42
-  synth_multi_add_impl.cc
43
-  synth_add_impl.cc
44
-  synth_mul_impl.cc
45
-  synth_play_wav_impl.cc
46
-  stdsynthmodule.cc
47
-  cache.cc
48
-  asyncschedule.cc
49
-  bytestreamtoaudio_impl.cc
50
-  stereovolumecontrol_impl.cc
51
-  stereoeffectstack_impl.cc
52
-  fft.c
53
-  stereofftscope_impl.cc
54
-  virtualports.cc
55
-  bus.cc
56
-  audiomanager_impl.cc
57
-  synth_record_impl.cc
58
-  resample.cc
59
-  audioio.cc
60
-  audioiooss.cc
61
-  audioioalsa.cc
62
-  audioioalsa9.cc
63
-  audioionull.cc
64
-  audioiolibaudioio.cc
65
-  audioioesd.cc
66
-  audioiojack.cc
67
-  audioiosun.cc
68
-  audioioaix.cc
69
-  audioionas.cc
70
-  cpuinfo.cc
71
-  audioioossthreaded.cc
72
-  audiotobytestream_impl.cc
73
-  audioiosgi.cc
74
-  audioiocsl.cc
75
-  audioiomas.cc
76
-  datahandle_impl.cc
77
-)
78 25
 
79
-include_directories(
80
-  ${CMAKE_BINARY_DIR} # for config.h
81
-  ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
82
-  ${CMAKE_SOURCE_DIR}/mcop # for common.h
83
-  ${CMAKE_CURRENT_BINARY_DIR} # for gsl/gslconfig.h
84
-  ${CMAKE_CURRENT_SOURCE_DIR} # for gsl/gsldefs.h
85
-  ${GLIB2_INCLUDE_DIRS} # for glib.h
26
+##### headers ###################################
27
+
28
+install( FILES
29
+    audiosubsys.h cache.h cachedwav.h convert.h
30
+    pipebuffer.h stdsynthmodule.h synthschedule.h
31
+    fft.h artsflow.idl audioio.h resample.h cpuinfo.h
32
+    bufferqueue.h gslschedule.h
33
+    ${CMAKE_CURRENT_BINARY_DIR}/artsflow.h
34
+  DESTINATION ${INCLUDE_INSTALL_DIR} )
35
+
36
+
37
+##### artsflow (shared lib) #####################
38
+
39
+set( target artsflow )
40
+
41
+set( ${target}_SRCS
42
+  synth_play_impl.cc gslschedule.cc audiosubsys.cc
43
+  pipebuffer.cc convert.cc synth_wave_sin_impl.cc
44
+  synth_frequency_impl.cc synth_multi_add_impl.cc
45
+  synth_add_impl.cc synth_mul_impl.cc synth_play_wav_impl.cc
46
+  stdsynthmodule.cc cache.cc asyncschedule.cc bytestreamtoaudio_impl.cc
47
+  stereovolumecontrol_impl.cc stereoeffectstack_impl.cc
48
+  fft.c stereofftscope_impl.cc virtualports.cc bus.cc
49
+  audiomanager_impl.cc synth_record_impl.cc resample.cc
50
+  audioio.cc audioiooss.cc audioioalsa.cc audioioalsa9.cc
51
+  audioionull.cc audioiolibaudioio.cc audioioesd.cc
52
+  audioiojack.cc audioiosun.cc audioioaix.cc audioionas.cc
53
+  cpuinfo.cc audioioossthreaded.cc audiotobytestream_impl.cc
54
+  audioiosgi.cc audioiocsl.cc audioiomas.cc datahandle_impl.cc
86 55
 )
87 56
 
88
-add_definitions(
89
-  -DHAVE_CONFIG_H
57
+tde_add_library( ${target} SHARED
58
+  SOURCES ${${target}_SRCS}
59
+  VERSION 1.0.0
60
+  LINK gsl-static gslpp-static artsflow_idl-shared ${AUDIOFILE_LIBRARIES}
61
+  DESTINATION ${LIB_INSTALL_DIR}
90 62
 )
91 63
 
92
-##### artsflow_idl
64
+##### artsflow_idl (shared lib) #################
93 65
 
94 66
 add_custom_command(
95 67
   OUTPUT artsflow.cc
@@ -97,28 +69,10 @@ add_custom_command(
97 69
   ARGS -t ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl
98 70
 )
99 71
 
100
-set( artsflow_idl_SRCS artsflow.cc )
101
-add_library( artsflow_idl SHARED ${artsflow_idl_SRCS} )
102
-set_target_properties( artsflow_idl PROPERTIES VERSION 1.0 SOVERSION 1 )
103
-target_link_libraries( artsflow_idl mcop ${ALSA_LIBRARY} )
104
-add_dependencies( artsflow_idl mcopidl )
105
-
106
-##### artsflow
107
-
108
-add_library( artsflow SHARED ${artsflow_SRCS} )
109
-set_target_properties( artsflow PROPERTIES VERSION 1.0 SOVERSION 1 )
110
-
111
-target_link_libraries( artsflow
112
-  artsflow_idl
113
-  mcop
114
-  gslpp
115
-  gsl
116
-  ${AUDIOFILE_LIBRARIES}
72
+tde_add_library( artsflow_idl SHARED
73
+  SOURCES artsflow.cc
74
+  VERSION 1.0.0
75
+  LINK mcop-shared ${ALSA_LIBRARY}
76
+  DESTINATION ${LIB_INSTALL_DIR}
77
+  DEPENDENCIES mcopidl
117 78
 )
118
-
119
-
120
-
121
-##### install ###################################
122
-
123
-install( FILES ${artsflow_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
124
-install( TARGETS artsflow_idl artsflow LIBRARY DESTINATION ${LIB_INSTALL_DIR} )

+ 31
- 60
flow/gsl/CMakeLists.txt View File

@@ -103,61 +103,7 @@ set( GSL_USE_ARTS_THREADS 1 )
103 103
 configure_file( gslconfig.h.in gslconfig.h @ONLY )
104 104
 
105 105
 
106
-##### compile ###################################
107
-
108
-set( gsl_INCS
109
-  ${CMAKE_CURRENT_BINARY_DIR}/gslconfig.h
110
-  gslcommon.h
111
-  gsldatacache.h
112
-  gsldatahandle.h
113
-  gsldefs.h
114
-  gslloader.h
115
-  gslmath.h
116
-  gslfilter.h
117
-  gsldatautils.h
118
-  gsldatahandle-vorbis.h
119
-  gslconvert.h
120
-  gslfft.h
121
-  gslieee754.h
122
-  gslsignal.h
123
-  gslmagic.h
124
-  gslengine.h
125
-  gslwaveosc.h
126
-  gslwavechunk.h
127
-  gsldatahandle-mad.h
128
-  gslosctable.h
129
-  gsloscillator.h
130
-)
131
-
132
-set( gsl_SRCS
133
-  gsldatacache.c
134
-  gsldatahandle.c
135
-  gslwavechunk.c
136
-  gsldatahandle-vorbis.c
137
-  gslmath.c
138
-  gslfilter.c
139
-  gslcommon.c
140
-  gsldatautils.c
141
-  gslmagic.c
142
-  gslloader-wav.c
143
-  gslloader-gslwave.c
144
-  gslloader-mad.c
145
-  gslloader-oggvorbis.c
146
-  gslconvert.c
147
-  gslfft.c
148
-  gslsignal.c
149
-  gslloader.c
150
-  gslwaveosc.c
151
-  gslengine.c
152
-  gsloputil.c
153
-  gslopmaster.c
154
-  gslopschedule.c
155
-  gsldatahandle-mad.c
156
-  gslosctable.c
157
-  gsloscillator.c
158
-  gslfilehash.c
159
-  gslartsthreads.cc
160
-)
106
+##### include paths #############################
161 107
 
162 108
 include_directories(
163 109
   ${CMAKE_BINARY_DIR}
@@ -168,12 +114,37 @@ include_directories(
168 114
   ${GLIB2_INCLUDE_DIRS}
169 115
 )
170 116
 
171
-add_library( gsl STATIC ${gsl_SRCS} )
172
-set_target_properties( gsl PROPERTIES COMPILE_FLAGS -fPIC )
173
-target_link_libraries( gsl ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${VORBISFILE_LIBRARIES} ${MAD_LIBRARIES} )
117
+
118
+##### headers ###################################
119
+
120
+install( FILES
121
+    gslcommon.h gsldatacache.h gsldatahandle.h
122
+    gsldefs.h gslloader.h gslmath.h gslfilter.h
123
+    gsldatautils.h gsldatahandle-vorbis.h gslconvert.h
124
+    gslfft.h gslieee754.h gslsignal.h gslmagic.h
125
+    gslengine.h gslwaveosc.h gslwavechunk.h
126
+    gsldatahandle-mad.h gslosctable.h gsloscillator.h
127
+    ${CMAKE_CURRENT_BINARY_DIR}/gslconfig.h
128
+  DESTINATION ${INCLUDE_INSTALL_DIR}/gsl )
174 129
 
175 130
 
176
-##### install ###################################
131
+##### gsl (static lib) ##########################
177 132
 
178
-install( FILES ${gsl_INCS} DESTINATION ${INCLUDE_INSTALL_DIR}/gsl )
133
+set( target gsl )
134
+
135
+set( ${target}_SRCS
136
+  gsldatacache.c gsldatahandle.c gslwavechunk.c
137
+  gsldatahandle-vorbis.c gslmath.c gslfilter.c
138
+  gslcommon.c gsldatautils.c gslmagic.c gslloader-wav.c
139
+  gslloader-gslwave.c gslloader-mad.c gslloader-oggvorbis.c
140
+  gslconvert.c gslfft.c gslsignal.c gslloader.c
141
+  gslwaveosc.c gslengine.c gsloputil.c gslopmaster.c
142
+  gslopschedule.c gsldatahandle-mad.c gslosctable.c
143
+  gsloscillator.c gslfilehash.c gslartsthreads.cc
144
+)
145
+
146
+tde_add_library( ${target} STATIC_PIC
147
+  SOURCES ${${target}_SRCS}
148
+  LINK ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${VORBISFILE_LIBRARIES} ${MAD_LIBRARIES}
149
+)
179 150
 

+ 7
- 5
flow/gslpp/CMakeLists.txt View File

@@ -16,9 +16,11 @@ include_directories(
16 16
   ${GLIB2_INCLUDE_DIRS}
17 17
 )
18 18
 
19
-set( gslpp_SRCS
20
-  datahandle.cpp
21
-)
22 19
 
23
-add_library( gslpp STATIC ${gslpp_SRCS} )
24
-set_target_properties( gslpp PROPERTIES COMPILE_FLAGS -fPIC)
20
+##### gslpp (static lib) ########################
21
+
22
+set( target gslpp )
23
+
24
+tde_add_library( ${target} STATIC_PIC
25
+  SOURCES datahandle.cpp
26
+)

+ 22
- 0
flow/mcopclass/CMakeLists.txt View File

@@ -0,0 +1,22 @@
1
+#################################################
2
+#
3
+#  (C) 2010 Serghei Amelian
4
+#  serghei (DOT) amelian (AT) gmail.com
5
+#
6
+#  Improvements and feedback are welcome
7
+#
8
+#  This file is released under GPL >= 2
9
+#
10
+#################################################
11
+
12
+##### other data ################################
13
+
14
+install( FILES
15
+    Synth_ADD.mcopclass Synth_FREQUENCY.mcopclass
16
+    Synth_MUL.mcopclass Synth_MULTI_ADD.mcopclass
17
+    Synth_PLAY.mcopclass Synth_RECORD.mcopclass
18
+    Synth_PLAY_WAV.mcopclass Synth_WAVE_SIN.mcopclass
19
+    Synth_BUS_DOWNLINK.mcopclass Synth_BUS_UPLINK.mcopclass
20
+    Synth_AMAN_PLAY.mcopclass Synth_AMAN_RECORD.mcopclass
21
+    DataHandlePlay.mcopclass WaveDataHandle.mcopclass
22
+  DESTINATION ${LIB_INSTALL_DIR}/mcop/Arts )

+ 15
- 16
gmcop/CMakeLists.txt View File

@@ -9,26 +9,25 @@
9 9
 #
10 10
 #################################################
11 11
 
12
-set( gmcop_INCS
13
-  giomanager.h
14
-)
15
-
16
-set( gmcop_SRCS
17
-  giomanager.cc
18
-)
19
-
20 12
 include_directories(
21
-  ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
22
-  ${CMAKE_SOURCE_DIR}/mcop # for iomanager.h, etc.
13
+  ${CMAKE_BINARY_DIR}/mcop
14
+  ${CMAKE_SOURCE_DIR}/mcop
23 15
   ${GLIB2_INCLUDE_DIRS}
24 16
 )
25 17
 
26
-add_library( gmcop SHARED ${gmcop_SRCS} )
27
-set_target_properties( gmcop PROPERTIES VERSION 1.0 SOVERSION 1 )
28
-target_link_libraries( gmcop mcop ${GLIB2_LIBRARIES} )
29 18
 
19
+##### headers ###################################
30 20
 
31
-##### install ###################################
21
+install( FILES
22
+    giomanager.h
23
+  DESTINATION ${INCLUDE_INSTALL_DIR} )
32 24
 
33
-install( FILES ${gmcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
34
-install(TARGETS gmcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
25
+
26
+##### gmcop (shared lib) ########################
27
+
28
+tde_add_library( gmcop SHARED
29
+  SOURCES giomanager.cc
30
+  VERSION 1.0.0
31
+  LINK mcop-shared ${GLIB2_LIBRARIES}
32
+  DESTINATION ${LIB_INSTALL_DIR}
33
+)

+ 43
- 95
mcop/CMakeLists.txt View File

@@ -9,115 +9,63 @@
9 9
 #
10 10
 #################################################
11 11
 
12
-set( mcop_INCS
13
-  ${CMAKE_CURRENT_BINARY_DIR}/arts_export.h
14
-  buffer.h
15
-  common.h
16
-  connection.h
17
-  core.h
18
-  dispatcher.h
19
-  factory.h
20
-  flowsystem.h
21
-  idlfilereg.h
22
-  ifacerepo_impl.h
23
-  iomanager.h
24
-  mcoputils.h
25
-  object.h
26
-  objectmanager.h
27
-  pool.h
28
-  socketconnection.h
29
-  startupmanager.h
30
-  tcpconnection.h
31
-  tcpserver.h
32
-  type.h
33
-  unixconnection.h
34
-  unixserver.h
35
-  referenceclean.h
36
-  datapacket.h
37
-  asyncstream.h
38
-  notification.h
39
-  extensionloader.h
40
-  mcopconfig.h
41
-  connect.h
42
-  reference.h
43
-  weakreference.h
44
-  dynamicrequest.h
45
-  anyref.h
46
-  debug.h
47
-  delayedreturn.h
48
-  dynamicskeleton.h
49
-  thread.h
50
-  core.idl
51
-)
52
-
53
-set( mcop_SRCS
54
-  buffer.cc
55
-  connection.cc
56
-  core.cc
57
-  debug.cc
58
-  dispatcher.cc
59
-  iomanager.cc
60
-  object.cc
61
-  socketconnection.cc
62
-  tcpconnection.cc
63
-  unixconnection.cc
64
-  tcpserver.cc
65
-  unixserver.cc
66
-  objectmanager.cc
67
-  factory.cc
68
-  idlfilereg.cc
69
-  ifacerepo_impl.cc
70
-  mcoputils.cc
71
-  startupmanager.cc
72
-  md5.c
73
-  md5auth.cc
74
-  referenceclean.cc
75
-  datapacket.cc
76
-  asyncstream.cc
77
-  notification.cc
78
-  flowsystem.cc
79
-  extensionloader.cc
80
-  tmpglobalcomm.cc
81
-  mcopconfig.cc
82
-  connect.cc
83
-  reference.cc
84
-  type.cc
85
-  trader_impl.cc
86
-  dynamicrequest.cc
87
-  anyref.cc
88
-  loopback.cc
89
-  delayedreturn.cc
90
-  thread.cc
91
-  dynamicskeleton.cc
92
-)
93
-
94 12
 configure_file( arts_export.h.in arts_export.h )
95 13
 
96 14
 if( NOT EXTENSION_DIR )
97
-  set( EXTENSION_DIR \"${CMAKE_INSTALL_PREFIX}/lib\" )
15
+  set( EXTENSION_DIR ${CMAKE_INSTALL_PREFIX}/lib )
98 16
 endif( NOT EXTENSION_DIR )
99 17
 
100 18
 if( NOT DTRADER_DIR )
101
-  set( DTRADER_DIR \"${CMAKE_INSTALL_PREFIX}/lib/mcop\" )
19
+  set( DTRADER_DIR ${CMAKE_INSTALL_PREFIX}/lib/mcop )
102 20
 endif( NOT DTRADER_DIR )
103 21
 
104 22
 add_definitions(
105
-  -DEXTENSION_DIR=${EXTENSION_DIR}
106
-  -DTRADER_DIR=${DTRADER_DIR}
23
+  -DEXTENSION_DIR=\"${EXTENSION_DIR}\"
24
+  -DTRADER_DIR=\"${DTRADER_DIR}\"
107 25
 )
108 26
 
109 27
 include_directories(
110
-  ${CMAKE_BINARY_DIR} # for config.h
111
-  ${CMAKE_CURRENT_BINARY_DIR} # for arts_export.h
28
+  ${CMAKE_BINARY_DIR}
29
+  ${CMAKE_CURRENT_BINARY_DIR}
112 30
 )
113 31
 
114
-add_library( mcop SHARED ${mcop_SRCS} )
115
-target_link_libraries( mcop ltdlc )
116
-set_target_properties( mcop PROPERTIES VERSION 1.0.0 SOVERSION 1 )
117 32
 
118
-add_dependencies( mcop ltdlc )
33
+##### headers ###################################
34
+
35
+install( FILES
36
+    buffer.h common.h connection.h core.h dispatcher.h
37
+    factory.h flowsystem.h idlfilereg.h ifacerepo_impl.h
38
+    iomanager.h mcoputils.h object.h objectmanager.h
39
+    pool.h socketconnection.h startupmanager.h tcpconnection.h
40
+    tcpserver.h type.h unixconnection.h unixserver.h
41
+    referenceclean.h datapacket.h asyncstream.h notification.h
42
+    extensionloader.h mcopconfig.h connect.h reference.h
43
+    weakreference.h dynamicrequest.h anyref.h debug.h
44
+    delayedreturn.h dynamicskeleton.h thread.h core.idl
45
+    ${CMAKE_CURRENT_BINARY_DIR}/arts_export.h
46
+  DESTINATION ${INCLUDE_INSTALL_DIR} )
119 47
 
120
-##### install ###################################
121 48
 
122
-install( FILES ${mcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
123
-install( TARGETS mcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
49
+##### mcop (shared library) #####################
50
+
51
+set( target mcop )
52
+
53
+set( ${target}_SRCS
54
+  buffer.cc connection.cc core.cc debug.cc dispatcher.cc
55
+  iomanager.cc object.cc socketconnection.cc tcpconnection.cc
56
+  unixconnection.cc tcpserver.cc unixserver.cc objectmanager.cc
57
+  factory.cc idlfilereg.cc ifacerepo_impl.cc mcoputils.cc
58
+  startupmanager.cc md5.c md5auth.cc referenceclean.cc
59
+  datapacket.cc asyncstream.cc notification.cc
60
+  flowsystem.cc extensionloader.cc tmpglobalcomm.cc
61
+  mcopconfig.cc connect.cc reference.cc type.cc
62
+  trader_impl.cc dynamicrequest.cc anyref.cc
63
+  loopback.cc delayedreturn.cc thread.cc dynamicskeleton.cc
64
+)
65
+
66
+tde_add_library( ${target} SHARED
67
+  SOURCES ${${target}_SRCS}
68
+  VERSION 1.0.0
69
+  LINK ltdlc-static
70
+  DESTINATION ${LIB_INSTALL_DIR}
71
+)

+ 11
- 5
mcop_mt/CMakeLists.txt View File

@@ -9,10 +9,16 @@
9 9
 #
10 10
 #################################################
11 11
 
12
-set( mcop_mt_SRCS
13
-  threads_posix.cc
12
+include_directories(
13
+  ${CMAKE_BINARY_DIR}
14 14
 )
15 15
 
16
-add_library( mcop_mt SHARED ${mcop_mt_SRCS} )
17
-set_target_properties( mcop_mt PROPERTIES VERSION 1.0 SOVERSION 1 )
18
-target_link_libraries( mcop_mt mcop artsflow )
16
+
17
+##### mcop_mt (shared lib ) #####################
18
+
19
+tde_add_library( mcop_mt SHARED
20
+  SOURCES threads_posix.cc
21
+  VERSION 1.0.0
22
+  LINK artsflow-shared
23
+  DESTINATION ${LIB_INSTALL_DIR}
24
+)

+ 10
- 14
mcopidl/CMakeLists.txt View File

@@ -9,26 +9,22 @@
9 9
 #
10 10
 #################################################
11 11
 
12
-set( mcopidl_SRCS
13
-  mcopidl.cc
14
-  yacc.cc
15
-  scanner.cc
16
-  namespace.cc
17
-)
18
-
19 12
 include_directories(
20 13
   ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
21 14
   ${CMAKE_SOURCE_DIR}/mcop # for common.h
22 15
 )
23 16
 
24
-#link_directories(
25
-#  ${CMAKE_BINARY_DIR}/mcop
26
-#)
27 17
 
28
-add_executable( mcopidl ${mcopidl_SRCS} )
29
-target_link_libraries( mcopidl mcop )
18
+##### mcopidl ###################################
30 19
 
20
+set( target mcopidl )
31 21
 
32
-##### install ###################################
22
+set( ${target}_SRCS
23
+  mcopidl.cc yacc.cc scanner.cc namespace.cc
24
+)
33 25
 
34
-install( TARGETS mcopidl DESTINATION ${BIN_INSTALL_DIR} )
26
+tde_add_executable( ${target}
27
+  SOURCES ${${target}_SRCS}
28
+  LINK mcop-shared
29
+  DESTINATION ${BIN_INSTALL_DIR}
30
+)

+ 19
- 21
qtmcop/CMakeLists.txt View File

@@ -15,36 +15,34 @@ add_definitions(
15 15
 
16 16
 include_directories(
17 17
   ${TQT_INCLUDE_DIRS}
18
-  ${CMAKE_CURRENT_BINARY_DIR} # for qiomanager_p.moc
19
-  ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
20
-  ${CMAKE_SOURCE_DIR}/mcop # for iomanager.h, etc.
18
+  ${CMAKE_CURRENT_BINARY_DIR}
19
+  ${CMAKE_BINARY_DIR}/mcop
20
+  ${CMAKE_SOURCE_DIR}/mcop
21 21
 )
22 22
 
23 23
 link_directories(
24 24
   ${TQT_LIBRARY_DIRS}
25 25
 )
26 26
 
27
-add_custom_command(
28
-  OUTPUT qiomanager_p.moc
29
-  COMMAND moc-tqt ARGS ${QT_MOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h qiomanager_p.moc
30
-  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h
31
-)
32 27
 
33
-set( qtmcop_INCS
34
-  qiomanager.h
35
-)
28
+##### headers ###################################
36 29
 
37
-set( qtmcop_SRCS
38
-  qiomanager.cc
39
-  qiomanager_p.moc
40
-)
30
+install( FILES
31
+    qiomanager.h
32
+  DESTINATION ${INCLUDE_INSTALL_DIR} )
41 33
 
42
-add_library( qtmcop SHARED ${qtmcop_SRCS} )
43
-set_target_properties( qtmcop PROPERTIES VERSION 1.0 SOVERSION 1 )
44
-target_link_libraries( qtmcop ${TQT_LIBRARIES} mcop )
45 34
 
35
+##### qtmcop ##############################
46 36
 
47
-##### install ###################################
37
+add_custom_command(
38
+  OUTPUT qiomanager_p.moc
39
+  COMMAND tmoc ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h -o qiomanager_p.moc
40
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h
41
+)
48 42
 
49
-install( FILES ${qtmcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
50
-install(TARGETS qtmcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
43
+tde_add_library( qtmcop SHARED
44
+  SOURCES qiomanager.cc qiomanager_p.moc
45
+  VERSION 1.0.0
46
+  LINK mcop-shared ${TQT_LIBRARIES}
47
+  DESTINATION ${LIB_INSTALL_DIR}
48
+)

Loading…
Cancel
Save