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

set( mcop_INCS
  ${CMAKE_CURRENT_BINARY_DIR}/arts_export.h
  buffer.h
  common.h
  connection.h
  core.h
  dispatcher.h
  factory.h
  flowsystem.h
  idlfilereg.h
  ifacerepo_impl.h
  iomanager.h
  mcoputils.h
  object.h
  objectmanager.h
  pool.h
  socketconnection.h
  startupmanager.h
  tcpconnection.h
  tcpserver.h
  type.h
  unixconnection.h
  unixserver.h
  referenceclean.h
  datapacket.h
  asyncstream.h
  notification.h
  extensionloader.h
  mcopconfig.h
  connect.h
  reference.h
  weakreference.h
  dynamicrequest.h
  anyref.h
  debug.h
  delayedreturn.h
  dynamicskeleton.h
  thread.h
  core.idl
)

set( mcop_SRCS
  buffer.cc
  connection.cc
  core.cc
  debug.cc
  dispatcher.cc
  iomanager.cc
  object.cc
  socketconnection.cc
  tcpconnection.cc
  unixconnection.cc
  tcpserver.cc
  unixserver.cc
  objectmanager.cc
  factory.cc
  idlfilereg.cc
  ifacerepo_impl.cc
  mcoputils.cc
  startupmanager.cc
  md5.c
  md5auth.cc
  referenceclean.cc
  datapacket.cc
  asyncstream.cc
  notification.cc
  flowsystem.cc
  extensionloader.cc
  tmpglobalcomm.cc
  mcopconfig.cc
  connect.cc
  reference.cc
  type.cc
  trader_impl.cc
  dynamicrequest.cc
  anyref.cc
  loopback.cc
  delayedreturn.cc
  thread.cc
  dynamicskeleton.cc
)

configure_file( arts_export.h.in arts_export.h )

if( NOT EXTENSION_DIR )
  set( EXTENSION_DIR \"${CMAKE_INSTALL_PREFIX}/lib\" )
endif( NOT EXTENSION_DIR )

if( NOT DTRADER_DIR )
  set( DTRADER_DIR \"${CMAKE_INSTALL_PREFIX}/lib/mcop\" )
endif( NOT DTRADER_DIR )

add_definitions(
  -DEXTENSION_DIR=${EXTENSION_DIR}
  -DTRADER_DIR=${DTRADER_DIR}
)

include_directories(
  ${CMAKE_BINARY_DIR} # for config.h
  ${CMAKE_CURRENT_BINARY_DIR} # for arts_export.h
)

add_library( mcop SHARED ${mcop_SRCS} )
target_link_libraries( mcop ltdlc )
set_target_properties( mcop PROPERTIES VERSION 1.0.0 SOVERSION 1 )

add_dependencies( mcop ltdlc )

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

install( FILES ${mcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
install( TARGETS mcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} )