Review Board 1.7.22


C++ Broker: Add limits to connections from users/hosts.

Review Request #4857 - Created April 24, 2012 and updated

Chug Rolke
trunk
QPID-2616
Reviewers
qpid
astitcher, gordon, tross
qpid
One user can consume all connections to the broker as a denial of service attack. This patch provides command line limits to the number of connections made by an individual user or by a host computer.
 
The user is tracked by the connection user name and hosts are tracked by the client computer's IP address as seen in the connection's management ID. 

This code uses the broker::ConnectionObserver facility.

This patch does NOT time out lower level socket connections such as when a user telnets in to the qpid broker socket and then transfers no data. To effect this function requires the addition of a transport/socket observer facility similar to the ConnectionObserver or to have those functions built into the lower layers.

This code is added as part of the ACL plugin. If the ACL plugin is not loaded then the functions are unavaliable and there is zero performance impact. Individual tracking limits may be disabled by setting their AclOptions values to 0.
in the works - to be tested as part of acl.py suite.
trunk/qpid/cpp/src/CMakeLists.txt
Revision 1330296 New Change
1
#
1
#
2
# Licensed to the Apache Software Foundation (ASF) under one
2
# Licensed to the Apache Software Foundation (ASF) under one
3
# or more contributor license agreements.  See the NOTICE file
3
# or more contributor license agreements.  See the NOTICE file
4
# distributed with this work for additional information
4
# distributed with this work for additional information
5
# regarding copyright ownership.  The ASF licenses this file
5
# regarding copyright ownership.  The ASF licenses this file
6
# to you under the Apache License, Version 2.0 (the
6
# to you under the Apache License, Version 2.0 (the
7
# "License"); you may not use this file except in compliance
7
# "License"); you may not use this file except in compliance
8
# with the License.  You may obtain a copy of the License at
8
# with the License.  You may obtain a copy of the License at
9
#
9
#
10
#   http://www.apache.org/licenses/LICENSE-2.0
10
#   http://www.apache.org/licenses/LICENSE-2.0
11
#
11
#
12
# Unless required by applicable law or agreed to in writing,
12
# Unless required by applicable law or agreed to in writing,
13
# software distributed under the License is distributed on an
13
# software distributed under the License is distributed on an
14
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
# KIND, either express or implied.  See the License for the
15
# KIND, either express or implied.  See the License for the
16
# specific language governing permissions and limitations
16
# specific language governing permissions and limitations
17
# under the License.
17
# under the License.
18
#
18
#
19

    
   
19

   
20
# library versions
20
# library versions
21
include (versions.cmake)
21
include (versions.cmake)
22

    
   
22

   
23
# Option to require building optional plugins
23
# Option to require building optional plugins
24
foreach (r ${REQUIRE})
24
foreach (r ${REQUIRE})
25
  set(${r}_force ON)
25
  set(${r}_force ON)
26
  message(STATUS "Forcing ${r} to ${${r}_force}")
26
  message(STATUS "Forcing ${r} to ${${r}_force}")
27
endforeach(r)
27
endforeach(r)
28

    
   
28

   
29
include(CheckFunctionExists)
29
include(CheckFunctionExists)
30
include(CheckIncludeFileCXX)
30
include(CheckIncludeFileCXX)
31
include(CheckIncludeFiles)
31
include(CheckIncludeFiles)
32
include(CheckIncludeFileCXX)
32
include(CheckIncludeFileCXX)
33
include(CheckLibraryExists)
33
include(CheckLibraryExists)
34
include(CheckSymbolExists)
34
include(CheckSymbolExists)
35
include(FindBoost)
35
include(FindBoost)
36
include(FindDoxygen)
36
include(FindDoxygen)
37

    
   
37

   
38
#set (CMAKE_VERBOSE_MAKEFILE ON)  # for debugging
38
#set (CMAKE_VERBOSE_MAKEFILE ON)  # for debugging
39

    
   
39

   
40
#
40
#
41
# Set up installation of .pdb files if the compiler is Visual Studio
41
# Set up installation of .pdb files if the compiler is Visual Studio
42
#
42
#
43
# Sample: install_pdb (qpidcommon ${QPID_COMPONENT_COMMON})
43
# Sample: install_pdb (qpidcommon ${QPID_COMPONENT_COMMON})
44
#
44
#
45
MACRO (install_pdb theLibrary theComponent)
45
MACRO (install_pdb theLibrary theComponent)
46
    if (MSVC)
46
    if (MSVC)
47
        get_target_property(library_dll ${theLibrary} LOCATION)
47
        get_target_property(library_dll ${theLibrary} LOCATION)
48
        string(REPLACE .dll .pdb library_pdb ${library_dll})
48
        string(REPLACE .dll .pdb library_pdb ${library_dll})
49
        string(REPLACE $(OutDir)        \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb})
49
        string(REPLACE $(OutDir)        \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb})
50
        string(REPLACE $(Configuration) \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb})
50
        string(REPLACE $(Configuration) \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb})
51
        string(REPLACE .pdb d.pdb libraryd_pdb ${library_pdb})
51
        string(REPLACE .pdb d.pdb libraryd_pdb ${library_pdb})
52
        #message(STATUS "_pdb: ${library_pdb}, ${libraryd_pdb}")
52
        #message(STATUS "_pdb: ${library_pdb}, ${libraryd_pdb}")
53
        install (PROGRAMS
53
        install (PROGRAMS
54
                ${library_pdb}
54
                ${library_pdb}
55
                DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB
55
                DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB
56
                COMPONENT ${theComponent}
56
                COMPONENT ${theComponent}
57
                OPTIONAL
57
                OPTIONAL
58
                CONFIGURATIONS Release|MinSizeRel)
58
                CONFIGURATIONS Release|MinSizeRel)
59
        install (PROGRAMS
59
        install (PROGRAMS
60
                ${library_pdb}
60
                ${library_pdb}
61
                DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB
61
                DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB
62
                COMPONENT ${theComponent}
62
                COMPONENT ${theComponent}
63
                CONFIGURATIONS RelWithDebInfo)
63
                CONFIGURATIONS RelWithDebInfo)
64
        install (PROGRAMS
64
        install (PROGRAMS
65
                ${libraryd_pdb}
65
                ${libraryd_pdb}
66
                DESTINATION ${QPID_INSTALL_LIBDIR}/DebugPDB
66
                DESTINATION ${QPID_INSTALL_LIBDIR}/DebugPDB
67
                COMPONENT ${theComponent}
67
                COMPONENT ${theComponent}
68
                CONFIGURATIONS Debug)
68
                CONFIGURATIONS Debug)
69
    endif (MSVC)
69
    endif (MSVC)
70
ENDMACRO (install_pdb)
70
ENDMACRO (install_pdb)
71

    
   
71

   
72
#
72
#
73
# inherit_value - if the symbol is undefined then set it to the given value.
73
# inherit_value - if the symbol is undefined then set it to the given value.
74
# Set flag to indicate this symbol was defined here.
74
# Set flag to indicate this symbol was defined here.
75
#
75
#
76
MACRO (inherit_value theSymbol theValue)
76
MACRO (inherit_value theSymbol theValue)
77
    if (NOT DEFINED ${theSymbol})
77
    if (NOT DEFINED ${theSymbol})
78
        set (${theSymbol} ${theValue})
78
        set (${theSymbol} ${theValue})
79
        # message ("Set symbol '${theSymbol}' to value '${theValue}'")
79
        # message ("Set symbol '${theSymbol}' to value '${theValue}'")
80
        set (${theSymbol}_inherited = "true")
80
        set (${theSymbol}_inherited = "true")
81
    endif (NOT DEFINED ${theSymbol})
81
    endif (NOT DEFINED ${theSymbol})
82
ENDMACRO (inherit_value)
82
ENDMACRO (inherit_value)
83

    
   
83

   
84
#
84
#
85
# If compiler is Visual Studio then create a "version resource" for the project.
85
# If compiler is Visual Studio then create a "version resource" for the project.
86
# Use this call to override CPACK and file global settings but not file per-project settings.
86
# Use this call to override CPACK and file global settings but not file per-project settings.
87
# Two groups of four version numbers specify "file" and "product" versions separately.
87
# Two groups of four version numbers specify "file" and "product" versions separately.
88
#
88
#
89
# Sample: add_msvc_version_full (qmfengine library dll 1 0 0 1 1 0 0 1)
89
# Sample: add_msvc_version_full (qmfengine library dll 1 0 0 1 1 0 0 1)
90
#
90
#
91
MACRO (add_msvc_version_full verProject verProjectType verProjectFileExt verFN1 verFN2 verFN3 verFN4 verPN1 verPN2 verPN3 verPN4)
91
MACRO (add_msvc_version_full verProject verProjectType verProjectFileExt verFN1 verFN2 verFN3 verFN4 verPN1 verPN2 verPN3 verPN4)
92
    if (MSVC)
92
    if (MSVC)
93
        # Create project-specific version strings
93
        # Create project-specific version strings
94
        inherit_value ("winver_${verProject}_FileVersionBinary"    "${verFN1},${verFN2},${verFN3},${verFN4}")
94
        inherit_value ("winver_${verProject}_FileVersionBinary"    "${verFN1},${verFN2},${verFN3},${verFN4}")
95
        inherit_value ("winver_${verProject}_ProductVersionBinary" "${verPN1},${verPN2},${verPN3},${verPN4}")
95
        inherit_value ("winver_${verProject}_ProductVersionBinary" "${verPN1},${verPN2},${verPN3},${verPN4}")
96
        inherit_value ("winver_${verProject}_FileVersionString"    "${verFN1}, ${verFN2}, ${verFN3}, ${verFN4}")
96
        inherit_value ("winver_${verProject}_FileVersionString"    "${verFN1}, ${verFN2}, ${verFN3}, ${verFN4}")
97
        inherit_value ("winver_${verProject}_ProductVersionString" "${verPN1}, ${verPN2}, ${verPN3}, ${verPN4}")
97
        inherit_value ("winver_${verProject}_ProductVersionString" "${verPN1}, ${verPN2}, ${verPN3}, ${verPN4}")
98
        inherit_value ("winver_${verProject}_FileDescription"      "${winver_PACKAGE_NAME}-${verProject} ${verProjectType}")
98
        inherit_value ("winver_${verProject}_FileDescription"      "${winver_PACKAGE_NAME}-${verProject} ${verProjectType}")
99
        inherit_value ("winver_${verProject}_LegalCopyright"       "${winver_LEGAL_COPYRIGHT}")
99
        inherit_value ("winver_${verProject}_LegalCopyright"       "${winver_LEGAL_COPYRIGHT}")
100
        inherit_value ("winver_${verProject}_InternalName"         "${verProject}")
100
        inherit_value ("winver_${verProject}_InternalName"         "${verProject}")
101
        inherit_value ("winver_${verProject}_OriginalFilename"     "${verProject}.${verProjectFileExt}")
101
        inherit_value ("winver_${verProject}_OriginalFilename"     "${verProject}.${verProjectFileExt}")
102
        inherit_value ("winver_${verProject}_ProductName"          "${winver_DESCRIPTION_SUMMARY}")
102
        inherit_value ("winver_${verProject}_ProductName"          "${winver_DESCRIPTION_SUMMARY}")
103

    
   
103

   
104
        # Create strings to be substituted into the template file
104
        # Create strings to be substituted into the template file
105
        set ("winverFileVersionBinary"     "${winver_${verProject}_FileVersionBinary}")
105
        set ("winverFileVersionBinary"     "${winver_${verProject}_FileVersionBinary}")
106
        set ("winverProductVersionBinary"  "${winver_${verProject}_ProductVersionBinary}")
106
        set ("winverProductVersionBinary"  "${winver_${verProject}_ProductVersionBinary}")
107
        set ("winverFileVersionString"     "${winver_${verProject}_FileVersionString}")
107
        set ("winverFileVersionString"     "${winver_${verProject}_FileVersionString}")
108
        set ("winverProductVersionString"  "${winver_${verProject}_ProductVersionString}")
108
        set ("winverProductVersionString"  "${winver_${verProject}_ProductVersionString}")
109
        set ("winverFileDescription"       "${winver_${verProject}_FileDescription}")
109
        set ("winverFileDescription"       "${winver_${verProject}_FileDescription}")
110
        set ("winverLegalCopyright"        "${winver_${verProject}_LegalCopyright}")
110
        set ("winverLegalCopyright"        "${winver_${verProject}_LegalCopyright}")
111
        set ("winverInternalName"          "${winver_${verProject}_InternalName}")
111
        set ("winverInternalName"          "${winver_${verProject}_InternalName}")
112
        set ("winverOriginalFilename"      "${winver_${verProject}_OriginalFilename}")
112
        set ("winverOriginalFilename"      "${winver_${verProject}_OriginalFilename}")
113
        set ("winverProductName"           "${winver_${verProject}_ProductName}")
113
        set ("winverProductName"           "${winver_${verProject}_ProductName}")
114

    
   
114

   
115
        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/resources/template-resource.rc
115
        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/resources/template-resource.rc
116
                       ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc)
116
                       ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc)
117
        set (${verProject}_SOURCES
117
        set (${verProject}_SOURCES
118
            ${${verProject}_SOURCES}
118
            ${${verProject}_SOURCES}
119
            ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc
119
            ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc
120
        )
120
        )
121
    endif (MSVC)
121
    endif (MSVC)
122
ENDMACRO (add_msvc_version_full)
122
ENDMACRO (add_msvc_version_full)
123

    
   
123

   
124
#
124
#
125
# If compiler is Visual Studio then create a "version resource" for the project.
125
# If compiler is Visual Studio then create a "version resource" for the project.
126
# Use this call to accept file override version settings or
126
# Use this call to accept file override version settings or
127
#  inherited CPACK_PACKAGE_VERSION version settings.
127
#  inherited CPACK_PACKAGE_VERSION version settings.
128
#
128
#
129
# Sample: add_msvc_version (qpidcommon library dll)
129
# Sample: add_msvc_version (qpidcommon library dll)
130
#
130
#
131
MACRO (add_msvc_version verProject verProjectType verProjectFileExt)
131
MACRO (add_msvc_version verProject verProjectType verProjectFileExt)
132
    if (MSVC)
132
    if (MSVC)
133
        add_msvc_version_full (${verProject}
133
        add_msvc_version_full (${verProject}
134
                               ${verProjectType}
134
                               ${verProjectType}
135
                               ${verProjectFileExt}
135
                               ${verProjectFileExt}
136
                               ${winver_FILE_VERSION_N1}
136
                               ${winver_FILE_VERSION_N1}
137
                               ${winver_FILE_VERSION_N2}
137
                               ${winver_FILE_VERSION_N2}
138
                               ${winver_FILE_VERSION_N3}
138
                               ${winver_FILE_VERSION_N3}
139
                               ${winver_FILE_VERSION_N4}
139
                               ${winver_FILE_VERSION_N4}
140
                               ${winver_PRODUCT_VERSION_N1}
140
                               ${winver_PRODUCT_VERSION_N1}
141
                               ${winver_PRODUCT_VERSION_N2}
141
                               ${winver_PRODUCT_VERSION_N2}
142
                               ${winver_PRODUCT_VERSION_N3}
142
                               ${winver_PRODUCT_VERSION_N3}
143
                               ${winver_PRODUCT_VERSION_N4})
143
                               ${winver_PRODUCT_VERSION_N4})
144
    endif (MSVC)
144
    endif (MSVC)
145
ENDMACRO (add_msvc_version)
145
ENDMACRO (add_msvc_version)
146

    
   
146

   
147

    
   
147

   
148
#
148
#
149
# Install optional windows version settings. Override variables are specified in a file.
149
# Install optional windows version settings. Override variables are specified in a file.
150
#
150
#
151
include (./CMakeWinVersions.cmake OPTIONAL)
151
include (./CMakeWinVersions.cmake OPTIONAL)
152

    
   
152

   
153
#
153
#
154
# Inherit global windows version settings from CPACK settings.
154
# Inherit global windows version settings from CPACK settings.
155
#
155
#
156
inherit_value ("winver_PACKAGE_NAME"         "${CPACK_PACKAGE_NAME}")
156
inherit_value ("winver_PACKAGE_NAME"         "${CPACK_PACKAGE_NAME}")
157
inherit_value ("winver_DESCRIPTION_SUMMARY"  "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
157
inherit_value ("winver_DESCRIPTION_SUMMARY"  "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
158
inherit_value ("winver_FILE_VERSION_N1"      "${CPACK_PACKAGE_VERSION_MAJOR}")
158
inherit_value ("winver_FILE_VERSION_N1"      "${CPACK_PACKAGE_VERSION_MAJOR}")
159
inherit_value ("winver_FILE_VERSION_N2"      "${CPACK_PACKAGE_VERSION_MINOR}")
159
inherit_value ("winver_FILE_VERSION_N2"      "${CPACK_PACKAGE_VERSION_MINOR}")
160
inherit_value ("winver_FILE_VERSION_N3"      "${CPACK_PACKAGE_VERSION_PATCH}")
160
inherit_value ("winver_FILE_VERSION_N3"      "${CPACK_PACKAGE_VERSION_PATCH}")
161
inherit_value ("winver_FILE_VERSION_N4"      "1")
161
inherit_value ("winver_FILE_VERSION_N4"      "1")
162
inherit_value ("winver_PRODUCT_VERSION_N1"   "${winver_FILE_VERSION_N1}")
162
inherit_value ("winver_PRODUCT_VERSION_N1"   "${winver_FILE_VERSION_N1}")
163
inherit_value ("winver_PRODUCT_VERSION_N2"   "${winver_FILE_VERSION_N2}")
163
inherit_value ("winver_PRODUCT_VERSION_N2"   "${winver_FILE_VERSION_N2}")
164
inherit_value ("winver_PRODUCT_VERSION_N3"   "${winver_FILE_VERSION_N3}")
164
inherit_value ("winver_PRODUCT_VERSION_N3"   "${winver_FILE_VERSION_N3}")
165
inherit_value ("winver_PRODUCT_VERSION_N4"   "${winver_FILE_VERSION_N4}")
165
inherit_value ("winver_PRODUCT_VERSION_N4"   "${winver_FILE_VERSION_N4}")
166
inherit_value ("winver_LEGAL_COPYRIGHT"      "")
166
inherit_value ("winver_LEGAL_COPYRIGHT"      "")
167

    
   
167

   
168

    
   
168

   
169
# check if we generate source as part of the build
169
# check if we generate source as part of the build
170
#   - rubygen generates the amqp spec and clustering
170
#   - rubygen generates the amqp spec and clustering
171
#   - managementgen generates the broker management code
171
#   - managementgen generates the broker management code
172
#
172
#
173
# rubygen subdir is excluded from stable distributions
173
# rubygen subdir is excluded from stable distributions
174
# If the main AMQP spec is present, then check if ruby and python are
174
# If the main AMQP spec is present, then check if ruby and python are
175
# present, and if any sources have changed, forcing a re-gen of source code.
175
# present, and if any sources have changed, forcing a re-gen of source code.
176

    
   
176

   
177
set(AMQP_SPEC_DIR ${qpid-cpp_SOURCE_DIR}/../specs)
177
set(AMQP_SPEC_DIR ${qpid-cpp_SOURCE_DIR}/../specs)
178
set(AMQP_SPEC ${AMQP_SPEC_DIR}/amqp.0-10-qpid-errata.xml)
178
set(AMQP_SPEC ${AMQP_SPEC_DIR}/amqp.0-10-qpid-errata.xml)
179
if (EXISTS ${AMQP_SPEC})
179
if (EXISTS ${AMQP_SPEC})
180
  include(FindRuby)
180
  include(FindRuby)
181
  include(FindPythonInterp)
181
  include(FindPythonInterp)
182
  if (NOT RUBY_EXECUTABLE)
182
  if (NOT RUBY_EXECUTABLE)
183
    message(FATAL_ERROR "Can't locate ruby, needed to generate source files.")
183
    message(FATAL_ERROR "Can't locate ruby, needed to generate source files.")
184
  endif (NOT RUBY_EXECUTABLE)
184
  endif (NOT RUBY_EXECUTABLE)
185
  if (NOT PYTHON_EXECUTABLE)
185
  if (NOT PYTHON_EXECUTABLE)
186
    message(FATAL_ERROR "Can't locate python, needed to generate source files.")
186
    message(FATAL_ERROR "Can't locate python, needed to generate source files.")
187
  endif (NOT PYTHON_EXECUTABLE)
187
  endif (NOT PYTHON_EXECUTABLE)
188

    
   
188

   
189
  set(specs ${AMQP_SPEC} ${qpid-cpp_SOURCE_DIR}/xml/cluster.xml)
189
  set(specs ${AMQP_SPEC} ${qpid-cpp_SOURCE_DIR}/xml/cluster.xml)
190
  set(regen_amqp OFF)
190
  set(regen_amqp OFF)
191
  set(rgen_dir ${qpid-cpp_SOURCE_DIR}/rubygen)
191
  set(rgen_dir ${qpid-cpp_SOURCE_DIR}/rubygen)
192
  file(GLOB_RECURSE rgen_progs ${rgen_dir}/*.rb)
192
  file(GLOB_RECURSE rgen_progs ${rgen_dir}/*.rb)
193
  # If any of the specs, or any of the sources used to generate code, change
193
  # If any of the specs, or any of the sources used to generate code, change
194
  # then regenerate the sources.
194
  # then regenerate the sources.
195
  foreach (spec_file ${specs} ${rgen_progs})
195
  foreach (spec_file ${specs} ${rgen_progs})
196
    if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
196
    if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
197
      set(regen_amqp ON)
197
      set(regen_amqp ON)
198
    endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
198
    endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
199
  endforeach (spec_file ${specs})
199
  endforeach (spec_file ${specs})
200
  if (regen_amqp)
200
  if (regen_amqp)
201
    message(STATUS "Regenerating AMQP protocol sources")
201
    message(STATUS "Regenerating AMQP protocol sources")
202
execute_process(COMMAND ${RUBY_EXECUTABLE} -I ${rgen_dir} ${rgen_dir}/generate ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../include  ${specs} all rubygen.cmake
202
execute_process(COMMAND ${RUBY_EXECUTABLE} -I ${rgen_dir} ${rgen_dir}/generate ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../include  ${specs} all rubygen.cmake
203
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
203
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
204
  else (regen_amqp)
204
  else (regen_amqp)
205
    message(STATUS "No need to generate AMQP protocol sources")
205
    message(STATUS "No need to generate AMQP protocol sources")
206
  endif (regen_amqp)
206
  endif (regen_amqp)
207

    
   
207

   
208
  set(mgmt_specs ${AMQP_SPEC_DIR}/management-schema.xml
208
  set(mgmt_specs ${AMQP_SPEC_DIR}/management-schema.xml
209
                 ${CMAKE_CURRENT_SOURCE_DIR}/qpid/acl/management-schema.xml
209
                 ${CMAKE_CURRENT_SOURCE_DIR}/qpid/acl/management-schema.xml
210
                 ${CMAKE_CURRENT_SOURCE_DIR}/qpid/cluster/management-schema.xml
210
                 ${CMAKE_CURRENT_SOURCE_DIR}/qpid/cluster/management-schema.xml
211
                 ${CMAKE_CURRENT_SOURCE_DIR}/qpid/ha/management-schema.xml
211
                 ${CMAKE_CURRENT_SOURCE_DIR}/qpid/ha/management-schema.xml
212
  )
212
  )
213
  set(mgen_dir ${qpid-cpp_SOURCE_DIR}/managementgen)
213
  set(mgen_dir ${qpid-cpp_SOURCE_DIR}/managementgen)
214
  set(regen_mgmt OFF)
214
  set(regen_mgmt OFF)
215
  foreach (spec_file ${mgmt_specs})
215
  foreach (spec_file ${mgmt_specs})
216
    if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
216
    if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
217
      message(STATUS "${spec_file} is newer")
217
      message(STATUS "${spec_file} is newer")
218
      set(regen_mgmt ON)
218
      set(regen_mgmt ON)
219
    endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
219
    endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
220
  endforeach (spec_file ${mgmt_specs})
220
  endforeach (spec_file ${mgmt_specs})
221
  if (regen_mgmt)
221
  if (regen_mgmt)
222
    message(STATUS "Regenerating Qpid Management Framework sources")
222
    message(STATUS "Regenerating Qpid Management Framework sources")
223
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs}
223
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs}
224
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
224
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
225
  else (regen_mgmt)
225
  else (regen_mgmt)
226
    message(STATUS "No need to generate Qpid Management Framework sources")
226
    message(STATUS "No need to generate Qpid Management Framework sources")
227
  endif (regen_mgmt)
227
  endif (regen_mgmt)
228

    
   
228

   
229
  # Pull in the names of the generated files, i.e. ${rgen_framing_srcs}
229
  # Pull in the names of the generated files, i.e. ${rgen_framing_srcs}
230
  include (${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
230
  include (${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake)
231
  include (${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
231
  include (${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake)
232

    
   
232

   
233
else (EXISTS ${AMQP_SPEC})
233
else (EXISTS ${AMQP_SPEC})
234
  message(STATUS "No AMQP spec... presume generated sources are included")
234
  message(STATUS "No AMQP spec... presume generated sources are included")
235
  set(QPID_GENERATED_HEADERS_IN_SOURCE ON)
235
  set(QPID_GENERATED_HEADERS_IN_SOURCE ON)
236
  include (rubygen.cmake)
236
  include (rubygen.cmake)
237
  include (managementgen.cmake)
237
  include (managementgen.cmake)
238
endif (EXISTS ${AMQP_SPEC})
238
endif (EXISTS ${AMQP_SPEC})
239

    
   
239

   
240
find_program(HELP2MAN help2man DOC "Location of the help2man program")
240
find_program(HELP2MAN help2man DOC "Location of the help2man program")
241
option(GEN_MANPAGES "Use help2man to generate man pages" ON)
241
option(GEN_MANPAGES "Use help2man to generate man pages" ON)
242
if (GEN_MANPAGES AND NOT HELP2MAN)
242
if (GEN_MANPAGES AND NOT HELP2MAN)
243
  message(STATUS "Can't locate the help2man command; man pages will not be generated")
243
  message(STATUS "Can't locate the help2man command; man pages will not be generated")
244
  set (GEN_MANPAGES OFF)
244
  set (GEN_MANPAGES OFF)
245
endif (GEN_MANPAGES AND NOT HELP2MAN)
245
endif (GEN_MANPAGES AND NOT HELP2MAN)
246

    
   
246

   
247
# FindDoxygen module tries to locate doxygen and Graphviz dot
247
# FindDoxygen module tries to locate doxygen and Graphviz dot
248
set (docs_default ON)
248
set (docs_default ON)
249
if (NOT DOXYGEN_EXECUTABLE)
249
if (NOT DOXYGEN_EXECUTABLE)
250
  set (docs_default OFF)
250
  set (docs_default OFF)
251
endif (NOT DOXYGEN_EXECUTABLE)
251
endif (NOT DOXYGEN_EXECUTABLE)
252
option(GEN_DOXYGEN "Use doxygen to generate user documentation" ${docs_default})
252
option(GEN_DOXYGEN "Use doxygen to generate user documentation" ${docs_default})
253
if (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE)
253
if (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE)
254
  message(STATUS "Can't locate the doxygen command; user documentation will not be generated")
254
  message(STATUS "Can't locate the doxygen command; user documentation will not be generated")
255
  set (GEN_DOXYGEN OFF)
255
  set (GEN_DOXYGEN OFF)
256
endif (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE)
256
endif (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE)
257

    
   
257

   
258
find_program(VALGRIND valgrind DOC "Location of the valgrind program")
258
find_program(VALGRIND valgrind DOC "Location of the valgrind program")
259
option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON)
259
option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON)
260
if (ENABLE_VALGRIND AND NOT VALGRIND)
260
if (ENABLE_VALGRIND AND NOT VALGRIND)
261
  message(STATUS "Can't locate the valgrind command; no run-time error detection")
261
  message(STATUS "Can't locate the valgrind command; no run-time error detection")
262
endif (ENABLE_VALGRIND AND NOT VALGRIND)
262
endif (ENABLE_VALGRIND AND NOT VALGRIND)
263

    
   
263

   
264
if (CMAKE_COMPILER_IS_GNUCXX)
264
if (CMAKE_COMPILER_IS_GNUCXX)
265
   # Warnings: Enable as many as possible, keep the code clean. Please
265
   # Warnings: Enable as many as possible, keep the code clean. Please
266
   # do not disable warnings or remove -Werror without discussing on
266
   # do not disable warnings or remove -Werror without discussing on
267
   # qpid-dev list.
267
   # qpid-dev list.
268
   #
268
   #
269
   # The following warnings are deliberately omitted, they warn on valid code.
269
   # The following warnings are deliberately omitted, they warn on valid code.
270
   # -Wunreachable-code -Wpadded -Winline
270
   # -Wunreachable-code -Wpadded -Winline
271
   # -Wshadow - warns about boost headers.
271
   # -Wshadow - warns about boost headers.
272
   set (WARNING_FLAGS
272
   set (WARNING_FLAGS
273
        "-Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual")
273
        "-Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual")
274

    
   
274

   
275
   set (GCC_CATCH_UNDEFINED "-Wl,--no-undefined")
275
   set (GCC_CATCH_UNDEFINED "-Wl,--no-undefined")
276
   # gcc on SunOS uses native linker whose "-z defs" is too fussy
276
   # gcc on SunOS uses native linker whose "-z defs" is too fussy
277
   if (CMAKE_SYSTEM_NAME STREQUAL SunOS)
277
   if (CMAKE_SYSTEM_NAME STREQUAL SunOS)
278
      set (GCC_CATCH_UNDEFINED "")
278
      set (GCC_CATCH_UNDEFINED "")
279
   endif (CMAKE_SYSTEM_NAME STREQUAL SunOS)
279
   endif (CMAKE_SYSTEM_NAME STREQUAL SunOS)
280
endif (CMAKE_COMPILER_IS_GNUCXX)
280
endif (CMAKE_COMPILER_IS_GNUCXX)
281

    
   
281

   
282
if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
282
if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
283
  set (COMPILER_FLAGS "-library=stlport4 -mt")
283
  set (COMPILER_FLAGS "-library=stlport4 -mt")
284
  set (WARNING_FLAGS "+w2")
284
  set (WARNING_FLAGS "+w2")
285
endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
285
endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
286

    
   
286

   
287
option(ENABLE_WARNINGS "Enable lots of compiler warnings (recommended)" ON)
287
option(ENABLE_WARNINGS "Enable lots of compiler warnings (recommended)" ON)
288
if (NOT ENABLE_WARNINGS)
288
if (NOT ENABLE_WARNINGS)
289
  set (WARNING_FLAGS "")
289
  set (WARNING_FLAGS "")
290
endif (NOT ENABLE_WARNINGS)
290
endif (NOT ENABLE_WARNINGS)
291

    
   
291

   
292
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}")
292
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}")
293

    
   
293

   
294
# Expand a bit from the basic Find_Boost; be specific about what's needed.
294
# Expand a bit from the basic Find_Boost; be specific about what's needed.
295
# Boost.system is sometimes needed; it's handled separately, below.
295
# Boost.system is sometimes needed; it's handled separately, below.
296
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
296
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
297
  set (Boost_components filesystem program_options date_time thread unit_test_framework regex)
297
  set (Boost_components filesystem program_options date_time thread unit_test_framework regex)
298
else (CMAKE_SYSTEM_NAME STREQUAL Windows)
298
else (CMAKE_SYSTEM_NAME STREQUAL Windows)
299
  set (Boost_components filesystem program_options unit_test_framework)
299
  set (Boost_components filesystem program_options unit_test_framework)
300
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
300
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
301

    
   
301

   
302
# Visual Studio 2010 requires boost 1.45 or better.
302
# Visual Studio 2010 requires boost 1.45 or better.
303
# The choice here is to fail demanding the user to update CMake to version N
303
# The choice here is to fail demanding the user to update CMake to version N
304
# where Boost 1.45 is supported, or we can just accept some versions using
304
# where Boost 1.45 is supported, or we can just accept some versions using
305
# the Additional_versions variable.
305
# the Additional_versions variable.
306
if (NOT DEFINED Boost_ADDITIONAL_VERSIONS)
306
if (NOT DEFINED Boost_ADDITIONAL_VERSIONS)
307
  set (Boost_ADDITIONAL_VERSIONS "1.45" "1.45.0" "1.46" "1.46.0" "1.47" "1.47.0")
307
  set (Boost_ADDITIONAL_VERSIONS "1.45" "1.45.0" "1.46" "1.46.0" "1.47" "1.47.0")
308
endif (NOT DEFINED Boost_ADDITIONAL_VERSIONS)
308
endif (NOT DEFINED Boost_ADDITIONAL_VERSIONS)
309

    
   
309

   
310
find_package(Boost 1.33 REQUIRED COMPONENTS ${Boost_components})
310
find_package(Boost 1.33 REQUIRED COMPONENTS ${Boost_components})
311
if(NOT Boost_FOUND)
311
if(NOT Boost_FOUND)
312
  message(FATAL_ERROR "Boost C++ libraries not found.  Please install or try setting BOOST_ROOT")
312
  message(FATAL_ERROR "Boost C++ libraries not found.  Please install or try setting BOOST_ROOT")
313
endif(NOT Boost_FOUND)
313
endif(NOT Boost_FOUND)
314

    
   
314

   
315
# Boost.system was introduced at Boost 1.35; it's needed secondarily by other
315
# Boost.system was introduced at Boost 1.35; it's needed secondarily by other
316
# Boost libs Qpid needs, so be sure it's there.
316
# Boost libs Qpid needs, so be sure it's there.
317
if (Boost_VERSION GREATER 103499)
317
if (Boost_VERSION GREATER 103499)
318
  find_package(Boost COMPONENTS system)
318
  find_package(Boost COMPONENTS system)
319

    
   
319

   
320
  # Allow for cmake pre 2.6 and boost post 1.35
320
  # Allow for cmake pre 2.6 and boost post 1.35
321
  if (NOT Boost_SYSTEM_LIBRARY)
321
  if (NOT Boost_SYSTEM_LIBRARY)
322
    set(Boost_SYSTEM_LIBRARY boost_system)
322
    set(Boost_SYSTEM_LIBRARY boost_system)
323
  endif (NOT Boost_SYSTEM_LIBRARY)
323
  endif (NOT Boost_SYSTEM_LIBRARY)
324
endif (Boost_VERSION GREATER 103499)
324
endif (Boost_VERSION GREATER 103499)
325

    
   
325

   
326
# Versions of cmake pre 2.6 don't set the Boost_*_LIBRARY variables correctly
326
# Versions of cmake pre 2.6 don't set the Boost_*_LIBRARY variables correctly
327
# these values are correct for Linux
327
# these values are correct for Linux
328
if (NOT Boost_PROGRAM_OPTIONS_LIBRARY)
328
if (NOT Boost_PROGRAM_OPTIONS_LIBRARY)
329
  set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
329
  set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
330
endif (NOT Boost_PROGRAM_OPTIONS_LIBRARY)
330
endif (NOT Boost_PROGRAM_OPTIONS_LIBRARY)
331

    
   
331

   
332
if (NOT Boost_FILESYSTEM_LIBRARY)
332
if (NOT Boost_FILESYSTEM_LIBRARY)
333
  set(Boost_FILESYSTEM_LIBRARY boost_filesystem)
333
  set(Boost_FILESYSTEM_LIBRARY boost_filesystem)
334
endif (NOT Boost_FILESYSTEM_LIBRARY)
334
endif (NOT Boost_FILESYSTEM_LIBRARY)
335

    
   
335

   
336
if (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY)
336
if (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY)
337
  set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY boost_unit_test_framework)
337
  set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY boost_unit_test_framework)
338
endif (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY)
338
endif (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY)
339

    
   
339

   
340
if (NOT Boost_REGEX_LIBRARY)
340
if (NOT Boost_REGEX_LIBRARY)
341
  set(Boost_REGEX_LIBRARY boost_regex)
341
  set(Boost_REGEX_LIBRARY boost_regex)
342
endif (NOT Boost_REGEX_LIBRARY)
342
endif (NOT Boost_REGEX_LIBRARY)
343

    
   
343

   
344
# The Windows install also wants the Boost DLLs, libs and headers that the
344
# The Windows install also wants the Boost DLLs, libs and headers that the
345
# release is built with. The DLLs enable everything to run, and the headers
345
# release is built with. The DLLs enable everything to run, and the headers
346
# and libs ensure that users building Qpid C++ client programs can compile
346
# and libs ensure that users building Qpid C++ client programs can compile
347
# (the C++ API still exposes Boost headers, but hopefully this will be fixed
347
# (the C++ API still exposes Boost headers, but hopefully this will be fixed
348
# in the future).
348
# in the future).
349
#
349
#
350
# On Windows you can pick whether the static or dynamic versions of the libs
350
# On Windows you can pick whether the static or dynamic versions of the libs
351
# are used; allow this choice to the user. Since we also install the Boost
351
# are used; allow this choice to the user. Since we also install the Boost
352
# DLLs that are needed for the Windows package, none are needed for the
352
# DLLs that are needed for the Windows package, none are needed for the
353
# static link case; else drop them into the install. Do this all first, since
353
# static link case; else drop them into the install. Do this all first, since
354
# Boost on Windows can use automatic linking to pick up the correct
354
# Boost on Windows can use automatic linking to pick up the correct
355
# Boost libs based on compile-time touching of the headers. Since we don't
355
# Boost libs based on compile-time touching of the headers. Since we don't
356
# really need to add them to the link lines, set the names to blanks.
356
# really need to add them to the link lines, set the names to blanks.
357
option(QPID_LINK_BOOST_DYNAMIC "Link with dynamic Boost libs (OFF to link static)" ON)
357
option(QPID_LINK_BOOST_DYNAMIC "Link with dynamic Boost libs (OFF to link static)" ON)
358
if (MSVC)
358
if (MSVC)
359
   install (PROGRAMS
359
   install (PROGRAMS
360
            ${Boost_DATE_TIME_LIBRARY_DEBUG} ${Boost_DATE_TIME_LIBRARY_RELEASE}
360
            ${Boost_DATE_TIME_LIBRARY_DEBUG} ${Boost_DATE_TIME_LIBRARY_RELEASE}
361
            ${Boost_FILESYSTEM_LIBRARY_DEBUG} ${Boost_FILESYSTEM_LIBRARY_RELEASE}
361
            ${Boost_FILESYSTEM_LIBRARY_DEBUG} ${Boost_FILESYSTEM_LIBRARY_RELEASE}
362
            ${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG} ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE}
362
            ${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG} ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE}
363
            ${Boost_REGEX_LIBRARY_DEBUG} ${Boost_REGEX_LIBRARY_RELEASE}
363
            ${Boost_REGEX_LIBRARY_DEBUG} ${Boost_REGEX_LIBRARY_RELEASE}
364
            ${Boost_THREAD_LIBRARY_DEBUG} ${Boost_THREAD_LIBRARY_RELEASE}
364
            ${Boost_THREAD_LIBRARY_DEBUG} ${Boost_THREAD_LIBRARY_RELEASE}
365
            DESTINATION ${QPID_INSTALL_LIBDIR}/boost
365
            DESTINATION ${QPID_INSTALL_LIBDIR}/boost
366
            COMPONENT ${QPID_COMPONENT_COMMON})
366
            COMPONENT ${QPID_COMPONENT_COMMON})
367

    
   
367

   
368
   if (NOT Boost_VERSION LESS 103500)
368
   if (NOT Boost_VERSION LESS 103500)
369
      install (PROGRAMS
369
      install (PROGRAMS
370
               ${Boost_SYSTEM_LIBRARY_DEBUG} ${Boost_SYSTEM_LIBRARY_RELEASE}
370
               ${Boost_SYSTEM_LIBRARY_DEBUG} ${Boost_SYSTEM_LIBRARY_RELEASE}
371
               DESTINATION ${QPID_INSTALL_LIBDIR}/boost
371
               DESTINATION ${QPID_INSTALL_LIBDIR}/boost
372
               COMPONENT ${QPID_COMPONENT_COMMON})
372
               COMPONENT ${QPID_COMPONENT_COMMON})
373
   endif (NOT Boost_VERSION LESS 103500)
373
   endif (NOT Boost_VERSION LESS 103500)
374

    
   
374

   
375
   if (QPID_LINK_BOOST_DYNAMIC)
375
   if (QPID_LINK_BOOST_DYNAMIC)
376
      add_definitions( /D BOOST_ALL_DYN_LINK)
376
      add_definitions( /D BOOST_ALL_DYN_LINK)
377
      string (REPLACE .lib .dll
377
      string (REPLACE .lib .dll
378
              _boost_date_time_debug ${Boost_DATE_TIME_LIBRARY_DEBUG})
378
              _boost_date_time_debug ${Boost_DATE_TIME_LIBRARY_DEBUG})
379
      string (REPLACE .lib .dll
379
      string (REPLACE .lib .dll
380
              _boost_date_time_release ${Boost_DATE_TIME_LIBRARY_RELEASE})
380
              _boost_date_time_release ${Boost_DATE_TIME_LIBRARY_RELEASE})
381
      string (REPLACE .lib .dll
381
      string (REPLACE .lib .dll
382
              _boost_filesystem_debug ${Boost_FILESYSTEM_LIBRARY_DEBUG})
382
              _boost_filesystem_debug ${Boost_FILESYSTEM_LIBRARY_DEBUG})
383
      string (REPLACE .lib .dll
383
      string (REPLACE .lib .dll
384
              _boost_filesystem_release ${Boost_FILESYSTEM_LIBRARY_RELEASE})
384
              _boost_filesystem_release ${Boost_FILESYSTEM_LIBRARY_RELEASE})
385
      string (REPLACE .lib .dll
385
      string (REPLACE .lib .dll
386
              _boost_program_options_debug ${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG})
386
              _boost_program_options_debug ${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG})
387
      string (REPLACE .lib .dll
387
      string (REPLACE .lib .dll
388
              _boost_program_options_release ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE})
388
              _boost_program_options_release ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE})
389
      string (REPLACE .lib .dll
389
      string (REPLACE .lib .dll
390
              _boost_regex_debug ${Boost_REGEX_LIBRARY_DEBUG})
390
              _boost_regex_debug ${Boost_REGEX_LIBRARY_DEBUG})
391
      string (REPLACE .lib .dll
391
      string (REPLACE .lib .dll
392
              _boost_regex_release ${Boost_REGEX_LIBRARY_RELEASE})
392
              _boost_regex_release ${Boost_REGEX_LIBRARY_RELEASE})
393
      string (REPLACE .lib .dll
393
      string (REPLACE .lib .dll
394
              _boost_thread_debug ${Boost_THREAD_LIBRARY_DEBUG})
394
              _boost_thread_debug ${Boost_THREAD_LIBRARY_DEBUG})
395
      string (REPLACE .lib .dll
395
      string (REPLACE .lib .dll
396
              _boost_thread_release ${Boost_THREAD_LIBRARY_RELEASE})
396
              _boost_thread_release ${Boost_THREAD_LIBRARY_RELEASE})
397
      # Boost 1.35 added the system library, which gets indirectly linked in
397
      # Boost 1.35 added the system library, which gets indirectly linked in
398
      # via other Boost libs. So, if building with Boost 1.35 or later, also
398
      # via other Boost libs. So, if building with Boost 1.35 or later, also
399
      # include system in the Windows install package.
399
      # include system in the Windows install package.
400
      if (NOT Boost_VERSION LESS 103500)
400
      if (NOT Boost_VERSION LESS 103500)
401
         string (REPLACE boost_thread boost_system
401
         string (REPLACE boost_thread boost_system
402
                 _boost_system_debug ${_boost_thread_debug})
402
                 _boost_system_debug ${_boost_thread_debug})
403
         string (REPLACE boost_thread boost_system
403
         string (REPLACE boost_thread boost_system
404
                 _boost_system_release ${_boost_thread_release})
404
                 _boost_system_release ${_boost_thread_release})
405
      endif (NOT Boost_VERSION LESS 103500)
405
      endif (NOT Boost_VERSION LESS 103500)
406
      install (PROGRAMS
406
      install (PROGRAMS
407
               ${_boost_date_time_debug} ${_boost_date_time_release}
407
               ${_boost_date_time_debug} ${_boost_date_time_release}
408
               ${_boost_filesystem_debug} ${_boost_filesystem_release}
408
               ${_boost_filesystem_debug} ${_boost_filesystem_release}
409
               ${_boost_program_options_debug} ${_boost_program_options_release}
409
               ${_boost_program_options_debug} ${_boost_program_options_release}
410
               ${_boost_regex_debug} ${_boost_regex_release}
410
               ${_boost_regex_debug} ${_boost_regex_release}
411
               ${_boost_system_debug} ${_boost_system_release}
411
               ${_boost_system_debug} ${_boost_system_release}
412
               ${_boost_thread_debug} ${_boost_thread_release}
412
               ${_boost_thread_debug} ${_boost_thread_release}
413
               DESTINATION ${QPID_INSTALL_LIBDIR}/boost
413
               DESTINATION ${QPID_INSTALL_LIBDIR}/boost
414
               COMPONENT ${QPID_COMPONENT_COMMON})
414
               COMPONENT ${QPID_COMPONENT_COMMON})
415
   endif (QPID_LINK_BOOST_DYNAMIC)
415
   endif (QPID_LINK_BOOST_DYNAMIC)
416

    
   
416

   
417
   # Need the boost headers regardless of which way the libs go. Try to
417
   # Need the boost headers regardless of which way the libs go. Try to
418
   # weed out what we don't need, else it's giant and unnecessary.
418
   # weed out what we don't need, else it's giant and unnecessary.
419
   install (DIRECTORY ${Boost_INCLUDE_DIR}/boost
419
   install (DIRECTORY ${Boost_INCLUDE_DIR}/boost
420
            DESTINATION ${QPID_INSTALL_INCLUDEDIR}
420
            DESTINATION ${QPID_INSTALL_INCLUDEDIR}
421
            COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}
421
            COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}
422
            PATTERN "accumulators/*" EXCLUDE
422
            PATTERN "accumulators/*" EXCLUDE
423
            PATTERN "algorithm/*" EXCLUDE
423
            PATTERN "algorithm/*" EXCLUDE
424
            PATTERN "archive/*" EXCLUDE
424
            PATTERN "archive/*" EXCLUDE
425
            PATTERN "asio*" EXCLUDE
425
            PATTERN "asio*" EXCLUDE
426
            PATTERN "bimap*" EXCLUDE
426
            PATTERN "bimap*" EXCLUDE
427
            PATTERN "circular_buffer*" EXCLUDE
427
            PATTERN "circular_buffer*" EXCLUDE
428
            PATTERN "concept*" EXCLUDE
428
            PATTERN "concept*" EXCLUDE
429
            PATTERN "dynamic_bitset*" EXCLUDE
429
            PATTERN "dynamic_bitset*" EXCLUDE
430
            PATTERN "flyweight*" EXCLUDE
430
            PATTERN "flyweight*" EXCLUDE
431
            PATTERN "fusion/*" EXCLUDE
431
            PATTERN "fusion/*" EXCLUDE
432
            PATTERN "gil/*" EXCLUDE
432
            PATTERN "gil/*" EXCLUDE
433
            PATTERN "graph/*" EXCLUDE
433
            PATTERN "graph/*" EXCLUDE
434
            PATTERN "interprocess/*" EXCLUDE
434
            PATTERN "interprocess/*" EXCLUDE
435
            PATTERN "lambda/*" EXCLUDE
435
            PATTERN "lambda/*" EXCLUDE
436
            PATTERN "logic/*" EXCLUDE
436
            PATTERN "logic/*" EXCLUDE
437
            PATTERN "math*" EXCLUDE
437
            PATTERN "math*" EXCLUDE
438
            PATTERN "mpi*" EXCLUDE
438
            PATTERN "mpi*" EXCLUDE
439
            PATTERN "multi_*" EXCLUDE
439
            PATTERN "multi_*" EXCLUDE
440
            PATTERN "numeric/*" EXCLUDE
440
            PATTERN "numeric/*" EXCLUDE
441
            PATTERN "pending/*" EXCLUDE
441
            PATTERN "pending/*" EXCLUDE
442
            PATTERN "pool/*" EXCLUDE
442
            PATTERN "pool/*" EXCLUDE
443
            PATTERN "property_map/*" EXCLUDE
443
            PATTERN "property_map/*" EXCLUDE
444
            PATTERN "proto/*" EXCLUDE
444
            PATTERN "proto/*" EXCLUDE
445
            PATTERN "random*" EXCLUDE
445
            PATTERN "random*" EXCLUDE
446
            PATTERN "signals*" EXCLUDE
446
            PATTERN "signals*" EXCLUDE
447
            PATTERN "spirit*" EXCLUDE
447
            PATTERN "spirit*" EXCLUDE
448
            PATTERN "statechart/*" EXCLUDE
448
            PATTERN "statechart/*" EXCLUDE
449
            PATTERN "units/*" EXCLUDE
449
            PATTERN "units/*" EXCLUDE
450
            PATTERN "unordered*" EXCLUDE
450
            PATTERN "unordered*" EXCLUDE
451
            PATTERN "wave*" EXCLUDE
451
            PATTERN "wave*" EXCLUDE
452
            PATTERN "xpressive/*" EXCLUDE)
452
            PATTERN "xpressive/*" EXCLUDE)
453

    
   
453

   
454
   set(Boost_DATE_TIME_LIBRARY "")
454
   set(Boost_DATE_TIME_LIBRARY "")
455
   set(Boost_THREAD_LIBRARY "")
455
   set(Boost_THREAD_LIBRARY "")
456
   set(Boost_PROGRAM_OPTIONS_LIBRARY "")
456
   set(Boost_PROGRAM_OPTIONS_LIBRARY "")
457
   set(Boost_FILESYSTEM_LIBRARY "")
457
   set(Boost_FILESYSTEM_LIBRARY "")
458
   set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "")
458
   set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "")
459
   set(Boost_REGEX_LIBRARY "")
459
   set(Boost_REGEX_LIBRARY "")
460
   include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/windows/resources )
460
   include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/windows/resources )
461
endif (MSVC)
461
endif (MSVC)
462

    
   
462

   
463
include_directories( ${Boost_INCLUDE_DIR} )
463
include_directories( ${Boost_INCLUDE_DIR} )
464

    
   
464

   
465
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
465
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
466
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../include )
466
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../include )
467
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
467
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
468
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../include )
468
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../include )
469

    
   
469

   
470
link_directories( ${Boost_LIBRARY_DIRS} )
470
link_directories( ${Boost_LIBRARY_DIRS} )
471

    
   
471

   
472
CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_RT)
472
CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_RT)
473
if (NOT CLOCK_GETTIME_IN_RT)
473
if (NOT CLOCK_GETTIME_IN_RT)
474
  CHECK_FUNCTION_EXISTS (clock_gettime QPID_HAS_CLOCK_GETTIME)
474
  CHECK_FUNCTION_EXISTS (clock_gettime QPID_HAS_CLOCK_GETTIME)
475
else (NOT CLOCK_GETTIME_IN_RT)
475
else (NOT CLOCK_GETTIME_IN_RT)
476
  set(CMAKE_REQUIRED_LIBS ${CMAKE_REQUIRED_LIBS} rt)
476
  set(CMAKE_REQUIRED_LIBS ${CMAKE_REQUIRED_LIBS} rt)
477
  set(QPID_HAS_CLOCK_GETTIME YES CACHE BOOL "Platform has clock_gettime")
477
  set(QPID_HAS_CLOCK_GETTIME YES CACHE BOOL "Platform has clock_gettime")
478
endif (NOT CLOCK_GETTIME_IN_RT)
478
endif (NOT CLOCK_GETTIME_IN_RT)
479

    
   
479

   
480
# Check for header file for dtrace static probes
480
# Check for header file for dtrace static probes
481
check_include_files(sys/sdt.h HAVE_SYS_SDT_H)
481
check_include_files(sys/sdt.h HAVE_SYS_SDT_H)
482
if (HAVE_SYS_SDT_H)
482
if (HAVE_SYS_SDT_H)
483
  set(probes_default ON)
483
  set(probes_default ON)
484
endif (HAVE_SYS_SDT_H)
484
endif (HAVE_SYS_SDT_H)
485
option(BUILD_PROBES "Build with DTrace/systemtap static probes" ${probes_default})
485
option(BUILD_PROBES "Build with DTrace/systemtap static probes" ${probes_default})
486
if (NOT BUILD_PROBES)
486
if (NOT BUILD_PROBES)
487
  set (HAVE_SYS_SDT_H 0)
487
  set (HAVE_SYS_SDT_H 0)
488
endif (NOT BUILD_PROBES)
488
endif (NOT BUILD_PROBES)
489

    
   
489

   
490
# Check for poll/epoll header files
490
# Check for poll/epoll header files
491
check_include_files(sys/poll.h HAVE_POLL)
491
check_include_files(sys/poll.h HAVE_POLL)
492
check_include_files(sys/epoll.h HAVE_EPOLL)
492
check_include_files(sys/epoll.h HAVE_EPOLL)
493

    
   
493

   
494
# Set default poller implementation (check from general to specific to allow overriding)
494
# Set default poller implementation (check from general to specific to allow overriding)
495
if (HAVE_POLL)
495
if (HAVE_POLL)
496
  set(poller_default poll)
496
  set(poller_default poll)
497
endif (HAVE_POLL)
497
endif (HAVE_POLL)
498
if (HAVE_EPOLL)
498
if (HAVE_EPOLL)
499
  set(poller_default epoll)
499
  set(poller_default epoll)
500
endif (HAVE_EPOLL)
500
endif (HAVE_EPOLL)
501
set(POLLER ${poller_default} CACHE STRING "Poller implementation (poll/epoll)")
501
set(POLLER ${poller_default} CACHE STRING "Poller implementation (poll/epoll)")
502

    
   
502

   
503
# If not windows ensure that we have uuid library
503
# If not windows ensure that we have uuid library
504
if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
504
if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
505
  CHECK_LIBRARY_EXISTS (uuid uuid_compare "" HAVE_UUID)
505
  CHECK_LIBRARY_EXISTS (uuid uuid_compare "" HAVE_UUID)
506
  CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
506
  CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
507
  if (NOT HAVE_UUID AND NOT HAVE_UUID_H)
507
  if (NOT HAVE_UUID AND NOT HAVE_UUID_H)
508
    message(FATAL_ERROR "Uuid library and/or header file not found")
508
    message(FATAL_ERROR "Uuid library and/or header file not found")
509
  endif (NOT HAVE_UUID AND NOT HAVE_UUID_H)
509
  endif (NOT HAVE_UUID AND NOT HAVE_UUID_H)
510
endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
510
endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
511

    
   
511

   
512
# See if Cyrus SASL is desired and available
512
# See if Cyrus SASL is desired and available
513
CHECK_LIBRARY_EXISTS (sasl2 sasl_checkpass "" HAVE_SASL)
513
CHECK_LIBRARY_EXISTS (sasl2 sasl_checkpass "" HAVE_SASL)
514
CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_H)
514
CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_H)
515

    
   
515

   
516
set (sasl_default ${sasl_force})
516
set (sasl_default ${sasl_force})
517
if (HAVE_SASL AND HAVE_SASL_H)
517
if (HAVE_SASL AND HAVE_SASL_H)
518
  set (sasl_default ON)
518
  set (sasl_default ON)
519
endif (HAVE_SASL AND HAVE_SASL_H)
519
endif (HAVE_SASL AND HAVE_SASL_H)
520

    
   
520

   
521
option(BUILD_SASL "Build with Cyrus SASL support" ${sasl_default})
521
option(BUILD_SASL "Build with Cyrus SASL support" ${sasl_default})
522
if (BUILD_SASL)
522
if (BUILD_SASL)
523
  if (NOT HAVE_SASL)
523
  if (NOT HAVE_SASL)
524
    message(FATAL_ERROR "Cyrus SASL support requested but libsasl2 not found")
524
    message(FATAL_ERROR "Cyrus SASL support requested but libsasl2 not found")
525
  endif (NOT HAVE_SASL)
525
  endif (NOT HAVE_SASL)
526
  if (NOT HAVE_SASL_H)
526
  if (NOT HAVE_SASL_H)
527
    message(FATAL_ERROR "Cyrus SASL support requested but sasl.h not found")
527
    message(FATAL_ERROR "Cyrus SASL support requested but sasl.h not found")
528
  endif (NOT HAVE_SASL_H)
528
  endif (NOT HAVE_SASL_H)
529

    
   
529

   
530
  find_program(SASLPASSWD2 saslpasswd2 DOC "Location of the saslpasswd2 program")
530
  find_program(SASLPASSWD2 saslpasswd2 DOC "Location of the saslpasswd2 program")
531
  set(BROKER_SASL_NAME "qpidd" CACHE STRING "SASL app name for the qpid broker")
531
  set(BROKER_SASL_NAME "qpidd" CACHE STRING "SASL app name for the qpid broker")
532
  set(qpidcommon_sasl_source
532
  set(qpidcommon_sasl_source
533
      qpid/sys/cyrus/CyrusSecurityLayer.h
533
      qpid/sys/cyrus/CyrusSecurityLayer.h
534
      qpid/sys/cyrus/CyrusSecurityLayer.cpp
534
      qpid/sys/cyrus/CyrusSecurityLayer.cpp
535
     )
535
     )
536
  set(qpidcommon_sasl_lib sasl2)
536
  set(qpidcommon_sasl_lib sasl2)
537
endif (BUILD_SASL)
537
endif (BUILD_SASL)
538

    
   
538

   
539
# See if XML Exchange is desired and prerequisites are available
539
# See if XML Exchange is desired and prerequisites are available
540
CHECK_LIBRARY_EXISTS (xerces-c _init "" HAVE_XERCES)
540
CHECK_LIBRARY_EXISTS (xerces-c _init "" HAVE_XERCES)
541
CHECK_INCLUDE_FILE_CXX (xercesc/framework/MemBufInputSource.hpp HAVE_XERCES_H)
541
CHECK_INCLUDE_FILE_CXX (xercesc/framework/MemBufInputSource.hpp HAVE_XERCES_H)
542
CHECK_INCLUDE_FILE_CXX (xqilla/xqilla-simple.hpp HAVE_XQILLA_H)
542
CHECK_INCLUDE_FILE_CXX (xqilla/xqilla-simple.hpp HAVE_XQILLA_H)
543
CHECK_INCLUDE_FILE_CXX (xqilla/ast/XQEffectiveBooleanValue.hpp HAVE_XQ_EBV)
543
CHECK_INCLUDE_FILE_CXX (xqilla/ast/XQEffectiveBooleanValue.hpp HAVE_XQ_EBV)
544

    
   
544

   
545
set (xml_default ${xml_force})
545
set (xml_default ${xml_force})
546
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
546
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
547
else (CMAKE_SYSTEM_NAME STREQUAL Windows)
547
else (CMAKE_SYSTEM_NAME STREQUAL Windows)
548
  if (HAVE_XERCES AND HAVE_XERCES_H)
548
  if (HAVE_XERCES AND HAVE_XERCES_H)
549
    if (HAVE_XQILLA_H)
549
    if (HAVE_XQILLA_H)
550
      set (xml_default ON)
550
      set (xml_default ON)
551
    endif (HAVE_XQILLA_H)
551
    endif (HAVE_XQILLA_H)
552
  endif (HAVE_XERCES AND HAVE_XERCES_H)
552
  endif (HAVE_XERCES AND HAVE_XERCES_H)
553
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
553
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
554

    
   
554

   
555
option(BUILD_XML "Build with XML Exchange" ${xml_default})
555
option(BUILD_XML "Build with XML Exchange" ${xml_default})
556
if (BUILD_XML)
556
if (BUILD_XML)
557
  if (NOT HAVE_XERCES)
557
  if (NOT HAVE_XERCES)
558
    message(FATAL_ERROR "XML Exchange support requested but xerces-c library not found")
558
    message(FATAL_ERROR "XML Exchange support requested but xerces-c library not found")
559
  endif (NOT HAVE_XERCES)
559
  endif (NOT HAVE_XERCES)
560
  if (NOT HAVE_XERCES_H)
560
  if (NOT HAVE_XERCES_H)
561
    message(FATAL_ERROR "XML Exchange support requested but Xerces-C headers not found")
561
    message(FATAL_ERROR "XML Exchange support requested but Xerces-C headers not found")
562
  endif (NOT HAVE_XERCES_H)
562
  endif (NOT HAVE_XERCES_H)
563
  if (NOT HAVE_XQILLA_H)
563
  if (NOT HAVE_XQILLA_H)
564
    message(FATAL_ERROR "XML Exchange support requested but XQilla headers not found")
564
    message(FATAL_ERROR "XML Exchange support requested but XQilla headers not found")
565
  endif (NOT HAVE_XQILLA_H)
565
  endif (NOT HAVE_XQILLA_H)
566

    
   
566

   
567
  if (HAVE_XQ_EBV)
567
  if (HAVE_XQ_EBV)
568
    add_definitions(-DXQ_EFFECTIVE_BOOLEAN_VALUE_HPP)
568
    add_definitions(-DXQ_EFFECTIVE_BOOLEAN_VALUE_HPP)
569
  endif (HAVE_XQ_EBV)
569
  endif (HAVE_XQ_EBV)
570

    
   
570

   
571
  add_library (xml MODULE
571
  add_library (xml MODULE
572
               qpid/xml/XmlExchange.cpp
572
               qpid/xml/XmlExchange.cpp
573
               qpid/xml/XmlExchange.h
573
               qpid/xml/XmlExchange.h
574
               qpid/xml/XmlExchangePlugin.cpp)
574
               qpid/xml/XmlExchangePlugin.cpp)
575
  set_target_properties (xml PROPERTIES PREFIX "")
575
  set_target_properties (xml PROPERTIES PREFIX "")
576
  target_link_libraries (xml xerces-c xqilla qpidbroker pthread)
576
  target_link_libraries (xml xerces-c xqilla qpidbroker pthread)
577
  if (CMAKE_COMPILER_IS_GNUCXX)
577
  if (CMAKE_COMPILER_IS_GNUCXX)
578
    set_target_properties (xml PROPERTIES
578
    set_target_properties (xml PROPERTIES
579
                           PREFIX ""
579
                           PREFIX ""
580
                           LINK_FLAGS ${GCC_CATCH_UNDEFINED})
580
                           LINK_FLAGS ${GCC_CATCH_UNDEFINED})
581
  endif (CMAKE_COMPILER_IS_GNUCXX)
581
  endif (CMAKE_COMPILER_IS_GNUCXX)
582
  install (TARGETS xml
582
  install (TARGETS xml
583
           DESTINATION ${QPIDD_MODULE_DIR}
583
           DESTINATION ${QPIDD_MODULE_DIR}
584
           COMPONENT ${QPID_COMPONENT_BROKER})
584
           COMPONENT ${QPID_COMPONENT_BROKER})
585

    
   
585

   
586
  set(xml_tests XmlClientSessionTest)
586
  set(xml_tests XmlClientSessionTest)
587

    
   
587

   
588
endif (BUILD_XML)
588
endif (BUILD_XML)
589

    
   
589

   
590
# Build the ACL plugin
590
# Build the ACL plugin
591
set (acl_default ON)
591
set (acl_default ON)
592
option(BUILD_ACL "Build ACL enforcement broker plugin" ${acl_default})
592
option(BUILD_ACL "Build ACL enforcement broker plugin" ${acl_default})
593
if (BUILD_ACL)
593
if (BUILD_ACL)
594
  set (acl_SOURCES
594
  set (acl_SOURCES
595
       qpid/acl/Acl.cpp
595
       qpid/acl/Acl.cpp
596
       qpid/acl/Acl.h
596
       qpid/acl/Acl.h

    
   
597
       qpid/acl/AclConnectionCounter.cpp

    
   
598
       qpid/acl/AclConnectionCounter.h
597
       qpid/acl/AclData.cpp
599
       qpid/acl/AclData.cpp
598
       qpid/acl/AclData.h
600
       qpid/acl/AclData.h
599
       qpid/acl/AclPlugin.cpp
601
       qpid/acl/AclPlugin.cpp
600
       qpid/acl/AclReader.cpp
602
       qpid/acl/AclReader.cpp
601
       qpid/acl/AclReader.h
603
       qpid/acl/AclReader.h
602
       qpid/acl/AclValidator.cpp
604
       qpid/acl/AclValidator.cpp
603
       qpid/acl/AclValidator.h
605
       qpid/acl/AclValidator.h
604
      )
606
      )
605
  # Windows builds the ACL code into the qpidbroker library; see QPID-1842
607
  # Windows builds the ACL code into the qpidbroker library; see QPID-1842
606
  # for history and rationale. If this is changed, remove the acl_SOURCES from
608
  # for history and rationale. If this is changed, remove the acl_SOURCES from
607
  # the qpidbroker platform-specific source list.
609
  # the qpidbroker platform-specific source list.
608
  if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
610
  if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
609
    add_library (acl MODULE ${acl_SOURCES})
611
    add_library (acl MODULE ${acl_SOURCES})
610
    set_target_properties (acl PROPERTIES PREFIX "")
612
    set_target_properties (acl PROPERTIES PREFIX "")
611
    target_link_libraries (acl qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
613
    target_link_libraries (acl qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
612
    if (CMAKE_COMPILER_IS_GNUCXX)
614
    if (CMAKE_COMPILER_IS_GNUCXX)
613
      set_target_properties (acl PROPERTIES
615
      set_target_properties (acl PROPERTIES
614
                             PREFIX ""
616
                             PREFIX ""
615
                             LINK_FLAGS "${GCC_CATCH_UNDEFINED}")
617
                             LINK_FLAGS "${GCC_CATCH_UNDEFINED}")
616
    endif (CMAKE_COMPILER_IS_GNUCXX)
618
    endif (CMAKE_COMPILER_IS_GNUCXX)
617
    install (TARGETS acl
619
    install (TARGETS acl
618
             DESTINATION ${QPIDD_MODULE_DIR}
620
             DESTINATION ${QPIDD_MODULE_DIR}
619
             COMPONENT ${QPID_COMPONENT_BROKER})
621
             COMPONENT ${QPID_COMPONENT_BROKER})
620
  endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
622
  endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
621
endif (BUILD_ACL)
623
endif (BUILD_ACL)
622

    
   
624

   
623
set (ha_default ON)
625
set (ha_default ON)
624
option(BUILD_HA "Build Active-Passive HA plugin" ${ha_default})
626
option(BUILD_HA "Build Active-Passive HA plugin" ${ha_default})
625
if (BUILD_HA)
627
if (BUILD_HA)
626
    set (ha_SOURCES
628
    set (ha_SOURCES
627
        qpid/ha/Backup.cpp
629
        qpid/ha/Backup.cpp
628
        qpid/ha/Backup.h
630
        qpid/ha/Backup.h
629
        qpid/ha/HaBroker.cpp
631
        qpid/ha/HaBroker.cpp
630
        qpid/ha/HaBroker.h
632
        qpid/ha/HaBroker.h
631
        qpid/ha/HaPlugin.cpp
633
        qpid/ha/HaPlugin.cpp
632
        qpid/ha/Settings.h
634
        qpid/ha/Settings.h
633
        qpid/ha/QueueReplicator.h
635
        qpid/ha/QueueReplicator.h
634
        qpid/ha/QueueReplicator.cpp
636
        qpid/ha/QueueReplicator.cpp
635
	qpid/ha/ReplicateLevel.h
637
	qpid/ha/ReplicateLevel.h
636
	qpid/ha/ReplicateLevel.cpp
638
	qpid/ha/ReplicateLevel.cpp
637
        qpid/ha/ReplicatingSubscription.h
639
        qpid/ha/ReplicatingSubscription.h
638
        qpid/ha/ReplicatingSubscription.cpp
640
        qpid/ha/ReplicatingSubscription.cpp
639
        qpid/ha/BrokerReplicator.cpp
641
        qpid/ha/BrokerReplicator.cpp
640
        qpid/ha/BrokerReplicator.h
642
        qpid/ha/BrokerReplicator.h
641
        qpid/ha/ConnectionExcluder.cpp
643
        qpid/ha/ConnectionExcluder.cpp
642
        qpid/ha/ConnectionExcluder.h
644
        qpid/ha/ConnectionExcluder.h
643
    )
645
    )
644

    
   
646

   
645
    add_library (ha MODULE ${ha_SOURCES})
647
    add_library (ha MODULE ${ha_SOURCES})
646
    set_target_properties (ha PROPERTIES PREFIX "")
648
    set_target_properties (ha PROPERTIES PREFIX "")
647
    target_link_libraries (ha qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
649
    target_link_libraries (ha qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
648
    if (CMAKE_COMPILER_IS_GNUCXX)
650
    if (CMAKE_COMPILER_IS_GNUCXX)
649
      set_target_properties (ha PROPERTIES
651
      set_target_properties (ha PROPERTIES
650
                             PREFIX ""
652
                             PREFIX ""
651
                             LINK_FLAGS -Wl,--no-undefined)
653
                             LINK_FLAGS -Wl,--no-undefined)
652
    endif (CMAKE_COMPILER_IS_GNUCXX)
654
    endif (CMAKE_COMPILER_IS_GNUCXX)
653
    install (TARGETS ha
655
    install (TARGETS ha
654
             DESTINATION ${QPIDD_MODULE_DIR}
656
             DESTINATION ${QPIDD_MODULE_DIR}
655
             COMPONENT ${QPID_COMPONENT_BROKER})
657
             COMPONENT ${QPID_COMPONENT_BROKER})
656
endif (BUILD_HA)
658
endif (BUILD_HA)
657

    
   
659

   
658
# Check for optional cluster support requirements
660
# Check for optional cluster support requirements
659
include (cluster.cmake)
661
include (cluster.cmake)
660

    
   
662

   
661
# Check for optional RDMA support requirements
663
# Check for optional RDMA support requirements
662
include (rdma.cmake)
664
include (rdma.cmake)
663

    
   
665

   
664
# Check for optional SSL support requirements
666
# Check for optional SSL support requirements
665
include (ssl.cmake)
667
include (ssl.cmake)
666

    
   
668

   
667
# Check for syslog capabilities not present on all systems
669
# Check for syslog capabilities not present on all systems
668
check_symbol_exists (LOG_AUTHPRIV "sys/syslog.h" HAVE_LOG_AUTHPRIV)
670
check_symbol_exists (LOG_AUTHPRIV "sys/syslog.h" HAVE_LOG_AUTHPRIV)
669
check_symbol_exists (LOG_FTP "sys/syslog.h" HAVE_LOG_FTP)
671
check_symbol_exists (LOG_FTP "sys/syslog.h" HAVE_LOG_FTP)
670

    
   
672

   
671
# Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version
673
# Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version
672
set (win32_winnt_default OFF)
674
set (win32_winnt_default OFF)
673
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
675
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
674
    if (MSVC)
676
    if (MSVC)
675
        set (win32_winnt_default ON)
677
        set (win32_winnt_default ON)
676
    endif (MSVC)
678
    endif (MSVC)
677
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
679
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
678
option(SET_WIN32_WINNT "In Windows-MSVC build: define _WIN32_WINNT=0x0502 to select target version: Windows XP with SP3" ${win32_winnt_default})
680
option(SET_WIN32_WINNT "In Windows-MSVC build: define _WIN32_WINNT=0x0502 to select target version: Windows XP with SP3" ${win32_winnt_default})
679

    
   
681

   
680
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
682
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
681
  if (MSVC)
683
  if (MSVC)
682
    add_definitions(
684
    add_definitions(
683
      /D "_CRT_NONSTDC_NO_WARNINGS"
685
      /D "_CRT_NONSTDC_NO_WARNINGS"
684
      /D "NOMINMAX"
686
      /D "NOMINMAX"
685
      /D "WIN32_LEAN_AND_MEAN"
687
      /D "WIN32_LEAN_AND_MEAN"
686
      /wd4244
688
      /wd4244
687
      /wd4800
689
      /wd4800
688
      /wd4355
690
      /wd4355
689
      /wd4267
691
      /wd4267
690
    )
692
    )
691
    if (SET_WIN32_WINNT)
693
    if (SET_WIN32_WINNT)
692
        add_definitions(/D "_WIN32_WINNT=0x0502")
694
        add_definitions(/D "_WIN32_WINNT=0x0502")
693
    endif (SET_WIN32_WINNT)
695
    endif (SET_WIN32_WINNT)
694

    
   
696

   
695
    # set the RelWithDebInfo compile/link switches to equal Release
697
    # set the RelWithDebInfo compile/link switches to equal Release
696
    set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /O2 /Ob2 /D NDEBUG")
698
    set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /O2 /Ob2 /D NDEBUG")
697
    set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/debug /INCREMENTAL:NO")
699
    set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/debug /INCREMENTAL:NO")
698

    
   
700

   
699
    if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src)
701
    if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src)
700
        # Set the windows version for the .NET Binding cpp project
702
        # Set the windows version for the .NET Binding cpp project
701
        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc
703
        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc
702
                       ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/org.apache.qpid.messaging.rc)
704
                       ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/org.apache.qpid.messaging.rc)
703
        # Set the windows version for the .NET Binding sessionreceiver project
705
        # Set the windows version for the .NET Binding sessionreceiver project
704
        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/sessionreceiver/properties/sessionreceiver-AssemblyInfo-template.cs
706
        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/sessionreceiver/properties/sessionreceiver-AssemblyInfo-template.cs
705
                       ${CMAKE_CURRENT_BINARY_DIR}/windows/generated_src/sessionreceiver-AssemblyInfo.cs)
707
                       ${CMAKE_CURRENT_BINARY_DIR}/windows/generated_src/sessionreceiver-AssemblyInfo.cs)
706
    endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src)
708
    endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src)
707
  endif (MSVC)
709
  endif (MSVC)
708

    
   
710

   
709
  set (qpidtypes_platform_SOURCES
711
  set (qpidtypes_platform_SOURCES
710
    qpid/sys/windows/uuid.cpp
712
    qpid/sys/windows/uuid.cpp
711
  )
713
  )
712
  set (qpidtypes_platform_LIBS
714
  set (qpidtypes_platform_LIBS
713
    rpcrt4
715
    rpcrt4
714
  )
716
  )
715

    
   
717

   
716
  set (qpidcommon_platform_SOURCES
718
  set (qpidcommon_platform_SOURCES
717
    qpid/log/windows/SinkOptions.cpp
719
    qpid/log/windows/SinkOptions.cpp
718
    qpid/sys/windows/AsynchIO.cpp
720
    qpid/sys/windows/AsynchIO.cpp
719
    qpid/sys/windows/FileSysDir.cpp
721
    qpid/sys/windows/FileSysDir.cpp
720
    qpid/sys/windows/IocpPoller.cpp
722
    qpid/sys/windows/IocpPoller.cpp
721
    qpid/sys/windows/IOHandle.cpp
723
    qpid/sys/windows/IOHandle.cpp
722
    qpid/sys/windows/LockFile.cpp
724
    qpid/sys/windows/LockFile.cpp
723
    qpid/sys/windows/PipeHandle.cpp
725
    qpid/sys/windows/PipeHandle.cpp
724
    qpid/sys/windows/PollableCondition.cpp
726
    qpid/sys/windows/PollableCondition.cpp
725
    qpid/sys/windows/Shlib.cpp
727
    qpid/sys/windows/Shlib.cpp
726
    qpid/sys/windows/Socket.cpp
728
    qpid/sys/windows/Socket.cpp
727
    qpid/sys/windows/SocketAddress.cpp
729
    qpid/sys/windows/SocketAddress.cpp
728
    qpid/sys/windows/StrError.cpp
730
    qpid/sys/windows/StrError.cpp
729
    qpid/sys/windows/SystemInfo.cpp
731
    qpid/sys/windows/SystemInfo.cpp
730
    qpid/sys/windows/Thread.cpp
732
    qpid/sys/windows/Thread.cpp
731
    qpid/sys/windows/Time.cpp
733
    qpid/sys/windows/Time.cpp
732
    qpid/sys/windows/MemStat.cpp
734
    qpid/sys/windows/MemStat.cpp
733
    qpid/client/windows/SaslFactory.cpp
735
    qpid/client/windows/SaslFactory.cpp
734
    ${sslcommon_windows_SOURCES}
736
    ${sslcommon_windows_SOURCES}
735
  )
737
  )
736

    
   
738

   
737
  set (qpidcommon_platform_LIBS
739
  set (qpidcommon_platform_LIBS
738
    ${Boost_THREAD_LIBRARY} ${windows_ssl_libs} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ws2_32  )
740
    ${Boost_THREAD_LIBRARY} ${windows_ssl_libs} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ws2_32  )
739
  set (qpidbroker_platform_SOURCES
741
  set (qpidbroker_platform_SOURCES
740
    qpid/broker/windows/BrokerDefaults.cpp
742
    qpid/broker/windows/BrokerDefaults.cpp
741
    qpid/broker/windows/SaslAuthenticator.cpp
743
    qpid/broker/windows/SaslAuthenticator.cpp
742
    ${acl_SOURCES}
744
    ${acl_SOURCES}
743
    ${sslbroker_windows_SOURCES}
745
    ${sslbroker_windows_SOURCES}
744
  )
746
  )
745
  set (qpidbroker_platform_LIBS
747
  set (qpidbroker_platform_LIBS
746
    ${windows_ssl_libs} ${windows_ssl_server_libs}
748
    ${windows_ssl_libs} ${windows_ssl_server_libs}
747
  )
749
  )
748
  set (qpidclient_platform_SOURCES
750
  set (qpidclient_platform_SOURCES
749
    ${sslclient_windows_SOURCES}
751
    ${sslclient_windows_SOURCES}
750
  )
752
  )
751
  set (qpidclient_platform_LIBS
753
  set (qpidclient_platform_LIBS
752
    ${windows_ssl_libs}
754
    ${windows_ssl_libs}
753
  )
755
  )
754

    
   
756

   
755
  set (qpidd_platform_SOURCES
757
  set (qpidd_platform_SOURCES
756
    windows/QpiddBroker.cpp
758
    windows/QpiddBroker.cpp
757
    windows/SCM.cpp
759
    windows/SCM.cpp
758
  )
760
  )
759

    
   
761

   
760
  set (qpidmessaging_platform_SOURCES
762
  set (qpidmessaging_platform_SOURCES
761
     qpid/messaging/HandleInstantiator.cpp
763
     qpid/messaging/HandleInstantiator.cpp
762
  )
764
  )
763

    
   
765

   
764
else (CMAKE_SYSTEM_NAME STREQUAL Windows)
766
else (CMAKE_SYSTEM_NAME STREQUAL Windows)
765

    
   
767

   
766
  # POSIX (Non-Windows) platforms have a lot of overlap in sources; the only
768
  # POSIX (Non-Windows) platforms have a lot of overlap in sources; the only
767
  # major difference is the poller module.
769
  # major difference is the poller module.
768
  if (POLLER STREQUAL poll)
770
  if (POLLER STREQUAL poll)
769
    set (qpid_poller_module
771
    set (qpid_poller_module
770
      qpid/sys/posix/PosixPoller.cpp
772
      qpid/sys/posix/PosixPoller.cpp
771
    )
773
    )
772
  elseif (POLLER STREQUAL epoll)
774
  elseif (POLLER STREQUAL epoll)
773
    set (qpid_poller_module
775
    set (qpid_poller_module
774
      qpid/sys/epoll/EpollPoller.cpp
776
      qpid/sys/epoll/EpollPoller.cpp
775
    )
777
    )
776
  endif (POLLER STREQUAL poll)
778
  endif (POLLER STREQUAL poll)
777

    
   
779

   
778
  if (CMAKE_SYSTEM_NAME STREQUAL Linux)
780
  if (CMAKE_SYSTEM_NAME STREQUAL Linux)
779
    set (qpid_system_module
781
    set (qpid_system_module
780
      qpid/sys/posix/SystemInfo.cpp
782
      qpid/sys/posix/SystemInfo.cpp
781
    )
783
    )
782
    add_definitions(-pthread)
784
    add_definitions(-pthread)
783
    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
785
    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
784
    if (CMAKE_COMPILER_IS_GNUCXX)
786
    if (CMAKE_COMPILER_IS_GNUCXX)
785
      set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GCC_CATCH_UNDEFINED} -pthread")
787
      set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GCC_CATCH_UNDEFINED} -pthread")
786
    endif (CMAKE_COMPILER_IS_GNUCXX)
788
    endif (CMAKE_COMPILER_IS_GNUCXX)
787
  endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
789
  endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
788

    
   
790

   
789
  set (qpidtypes_platform_SOURCES)
791
  set (qpidtypes_platform_SOURCES)
790
  set (qpidtypes_platform_LIBS
792
  set (qpidtypes_platform_LIBS
791
       uuid
793
       uuid
792
       ${Boost_SYSTEM_LIBRARY}
794
       ${Boost_SYSTEM_LIBRARY}
793
  )
795
  )
794

    
   
796

   
795
  if (CMAKE_SYSTEM_NAME STREQUAL SunOS)
797
  if (CMAKE_SYSTEM_NAME STREQUAL SunOS)
796
    set (qpid_system_module
798
    set (qpid_system_module
797
      qpid/sys/solaris/SystemInfo.cpp
799
      qpid/sys/solaris/SystemInfo.cpp
798
    )
800
    )
799
#   On Sun we want -lpthread -lthread as the 2nd last and last libs passed to linker
801
#   On Sun we want -lpthread -lthread as the 2nd last and last libs passed to linker
800
    set (qpidtypes_platform_LIBS ${qpidtypes_platform_LIBS}
802
    set (qpidtypes_platform_LIBS ${qpidtypes_platform_LIBS}
801
      pthread
803
      pthread
802
      thread
804
      thread
803
    )
805
    )
804
  endif (CMAKE_SYSTEM_NAME STREQUAL SunOS)
806
  endif (CMAKE_SYSTEM_NAME STREQUAL SunOS)
805

    
   
807

   
806
  set (qpidcommon_platform_SOURCES
808
  set (qpidcommon_platform_SOURCES
807
    qpid/sys/posix/AsynchIO.cpp
809
    qpid/sys/posix/AsynchIO.cpp
808
    qpid/sys/posix/Fork.cpp
810
    qpid/sys/posix/Fork.cpp
809
    qpid/sys/posix/FileSysDir.cpp
811
    qpid/sys/posix/FileSysDir.cpp
810
    qpid/sys/posix/IOHandle.cpp
812
    qpid/sys/posix/IOHandle.cpp
811
    qpid/sys/posix/LockFile.cpp
813
    qpid/sys/posix/LockFile.cpp
812
    qpid/sys/posix/MemStat.cpp
814
    qpid/sys/posix/MemStat.cpp
813
    qpid/sys/posix/Mutex.cpp
815
    qpid/sys/posix/Mutex.cpp
814
    qpid/sys/posix/PipeHandle.cpp
816
    qpid/sys/posix/PipeHandle.cpp
815
    qpid/sys/posix/PollableCondition.cpp
817
    qpid/sys/posix/PollableCondition.cpp
816
    qpid/sys/posix/Shlib.cpp
818
    qpid/sys/posix/Shlib.cpp
817
    qpid/log/posix/SinkOptions.cpp
819
    qpid/log/posix/SinkOptions.cpp
818
    qpid/sys/posix/Socket.cpp
820
    qpid/sys/posix/Socket.cpp
819
    qpid/sys/posix/SocketAddress.cpp
821
    qpid/sys/posix/SocketAddress.cpp
820
    qpid/sys/posix/StrError.cpp
822
    qpid/sys/posix/StrError.cpp
821
    qpid/sys/posix/Thread.cpp
823
    qpid/sys/posix/Thread.cpp
822
    qpid/sys/posix/Time.cpp
824
    qpid/sys/posix/Time.cpp
823
    qpid/SaslFactory.cpp
825
    qpid/SaslFactory.cpp
824

    
   
826

   
825
    ${qpid_system_module}
827
    ${qpid_system_module}
826
    ${qpid_poller_module}
828
    ${qpid_poller_module}
827
  )
829
  )
828
  set (qpidcommon_platform_LIBS
830
  set (qpidcommon_platform_LIBS
829
    ${Boost_PROGRAM_OPTIONS_LIBRARY}
831
    ${Boost_PROGRAM_OPTIONS_LIBRARY}
830
    ${Boost_FILESYSTEM_LIBRARY}
832
    ${Boost_FILESYSTEM_LIBRARY}
831
    ${CMAKE_DL_LIBS}
833
    ${CMAKE_DL_LIBS}
832
  )
834
  )
833

    
   
835

   
834
  set (qpidbroker_platform_SOURCES
836
  set (qpidbroker_platform_SOURCES
835
     qpid/broker/Daemon.cpp
837
     qpid/broker/Daemon.cpp
836
     qpid/broker/SaslAuthenticator.cpp
838
     qpid/broker/SaslAuthenticator.cpp
837
     qpid/broker/SignalHandler.h
839
     qpid/broker/SignalHandler.h
838
     qpid/broker/SignalHandler.cpp
840
     qpid/broker/SignalHandler.cpp
839
     qpid/broker/posix/BrokerDefaults.cpp
841
     qpid/broker/posix/BrokerDefaults.cpp
840
  )
842
  )
841

    
   
843

   
842
  set (qpidclient_platform_SOURCES
844
  set (qpidclient_platform_SOURCES
843
  )
845
  )
844

    
   
846

   
845
  set (qpidd_platform_SOURCES
847
  set (qpidd_platform_SOURCES
846
    posix/QpiddBroker.cpp
848
    posix/QpiddBroker.cpp
847
  )
849
  )
848

    
   
850

   
849
  set (qpidmessaging_platform_SOURCES
851
  set (qpidmessaging_platform_SOURCES
850
  )
852
  )
851
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
853
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
852

    
   
854

   
853
set (qpidcommon_SOURCES
855
set (qpidcommon_SOURCES
854
     ${rgen_framing_srcs}
856
     ${rgen_framing_srcs}
855
     ${qpidcommon_platform_SOURCES}
857
     ${qpidcommon_platform_SOURCES}
856
     ${qpidcommon_sasl_source}
858
     ${qpidcommon_sasl_source}
857
     qpid/assert.cpp
859
     qpid/assert.cpp
858
     qpid/Address.cpp
860
     qpid/Address.cpp
859
     qpid/DataDir.cpp
861
     qpid/DataDir.cpp
860
     qpid/Exception.cpp
862
     qpid/Exception.cpp
861
     qpid/Modules.cpp
863
     qpid/Modules.cpp
862
     qpid/Options.cpp
864
     qpid/Options.cpp
863
     qpid/Plugin.cpp
865
     qpid/Plugin.cpp
864
     qpid/RefCountedBuffer.cpp
866
     qpid/RefCountedBuffer.cpp
865
     qpid/SessionState.cpp
867
     qpid/SessionState.cpp
866
     qpid/SessionId.cpp
868
     qpid/SessionId.cpp
867
     qpid/StringUtils.cpp
869
     qpid/StringUtils.cpp
868
     qpid/Url.cpp
870
     qpid/Url.cpp
869
     qpid/UrlArray.cpp
871
     qpid/UrlArray.cpp
870
     qpid/amqp_0_10/SessionHandler.cpp
872
     qpid/amqp_0_10/SessionHandler.cpp
871
     qpid/framing/AccumulatedAck.cpp
873
     qpid/framing/AccumulatedAck.cpp
872
     qpid/framing/AMQBody.cpp
874
     qpid/framing/AMQBody.cpp
873
     qpid/framing/AMQMethodBody.cpp
875
     qpid/framing/AMQMethodBody.cpp
874
     qpid/framing/AMQContentBody.cpp
876
     qpid/framing/AMQContentBody.cpp
875
     qpid/framing/AMQFrame.cpp
877
     qpid/framing/AMQFrame.cpp
876
     qpid/framing/AMQHeaderBody.cpp
878
     qpid/framing/AMQHeaderBody.cpp
877
     qpid/framing/AMQHeartbeatBody.cpp
879
     qpid/framing/AMQHeartbeatBody.cpp
878
     qpid/framing/Array.cpp
880
     qpid/framing/Array.cpp
879
     qpid/framing/Buffer.cpp
881
     qpid/framing/Buffer.cpp
880
     qpid/framing/Endian.cpp
882
     qpid/framing/Endian.cpp
881
     qpid/framing/FieldTable.cpp
883
     qpid/framing/FieldTable.cpp
882
     qpid/framing/FieldValue.cpp
884
     qpid/framing/FieldValue.cpp
883
     qpid/framing/FrameSet.cpp
885
     qpid/framing/FrameSet.cpp
884
     qpid/framing/FrameDecoder.cpp
886
     qpid/framing/FrameDecoder.cpp
885
     qpid/framing/List.cpp
887
     qpid/framing/List.cpp
886
     qpid/framing/ProtocolInitiation.cpp
888
     qpid/framing/ProtocolInitiation.cpp
887
     qpid/framing/ProtocolVersion.cpp
889
     qpid/framing/ProtocolVersion.cpp
888
     qpid/framing/SendContent.cpp
890
     qpid/framing/SendContent.cpp
889
     qpid/framing/SequenceNumber.cpp
891
     qpid/framing/SequenceNumber.cpp
890
     qpid/framing/SequenceNumberSet.cpp
892
     qpid/framing/SequenceNumberSet.cpp
891
     qpid/framing/SequenceSet.cpp
893
     qpid/framing/SequenceSet.cpp
892
     qpid/framing/Proxy.cpp
894
     qpid/framing/Proxy.cpp
893
     qpid/framing/Uuid.cpp
895
     qpid/framing/Uuid.cpp
894
     qpid/framing/TransferContent.cpp
896
     qpid/framing/TransferContent.cpp
895
     qpid/log/Logger.cpp
897
     qpid/log/Logger.cpp
896
     qpid/log/Options.cpp
898
     qpid/log/Options.cpp
897
     qpid/log/OstreamOutput.cpp
899
     qpid/log/OstreamOutput.cpp
898
     qpid/log/Selector.cpp
900
     qpid/log/Selector.cpp
899
     qpid/log/Statement.cpp
901
     qpid/log/Statement.cpp
900
     qpid/management/Buffer.cpp
902
     qpid/management/Buffer.cpp
901
     qpid/management/ConnectionSettings.cpp
903
     qpid/management/ConnectionSettings.cpp
902
     qpid/management/Mutex.cpp
904
     qpid/management/Mutex.cpp
903
     qpid/management/Manageable.cpp
905
     qpid/management/Manageable.cpp
904
     qpid/management/ManagementObject.cpp
906
     qpid/management/ManagementObject.cpp
905
     qpid/sys/AggregateOutput.cpp
907
     qpid/sys/AggregateOutput.cpp
906
     qpid/sys/AsynchIOHandler.cpp
908
     qpid/sys/AsynchIOHandler.cpp
907
     qpid/sys/ClusterSafe.cpp
909
     qpid/sys/ClusterSafe.cpp
908
     qpid/sys/Dispatcher.cpp
910
     qpid/sys/Dispatcher.cpp
909
     qpid/sys/DispatchHandle.cpp
911
     qpid/sys/DispatchHandle.cpp
910
     qpid/sys/Runnable.cpp
912
     qpid/sys/Runnable.cpp
911
     qpid/sys/Shlib.cpp
913
     qpid/sys/Shlib.cpp
912
     qpid/sys/Timer.cpp
914
     qpid/sys/Timer.cpp
913
     qpid/sys/TimerWarnings.cpp
915
     qpid/sys/TimerWarnings.cpp
914
     qpid/amqp_0_10/Codecs.cpp
916
     qpid/amqp_0_10/Codecs.cpp
915
)
917
)
916
add_msvc_version (qpidcommon library dll)
918
add_msvc_version (qpidcommon library dll)
917

    
   
919

   
918
add_library (qpidcommon SHARED ${qpidcommon_SOURCES})
920
add_library (qpidcommon SHARED ${qpidcommon_SOURCES})
919
if (CLOCK_GETTIME_IN_RT)
921
if (CLOCK_GETTIME_IN_RT)
920
  set (qpidcommon_platform_LIBS ${qpidcommon_platform_LIBS} rt)
922
  set (qpidcommon_platform_LIBS ${qpidcommon_platform_LIBS} rt)
921
endif (CLOCK_GETTIME_IN_RT)
923
endif (CLOCK_GETTIME_IN_RT)
922
target_link_libraries (qpidcommon qpidtypes
924
target_link_libraries (qpidcommon qpidtypes
923
                       ${qpidcommon_platform_LIBS}
925
                       ${qpidcommon_platform_LIBS}
924
                       ${qpidcommon_sasl_lib})
926
                       ${qpidcommon_sasl_lib})
925
set_target_properties (qpidcommon PROPERTIES
927
set_target_properties (qpidcommon PROPERTIES
926
                       VERSION ${qpidcommon_version})
928
                       VERSION ${qpidcommon_version})
927
install (TARGETS qpidcommon
929
install (TARGETS qpidcommon
928
         DESTINATION ${QPID_INSTALL_LIBDIR}
930
         DESTINATION ${QPID_INSTALL_LIBDIR}
929
         COMPONENT ${QPID_COMPONENT_COMMON})
931
         COMPONENT ${QPID_COMPONENT_COMMON})
930
install_pdb (qpidcommon ${QPID_COMPONENT_COMMON})
932
install_pdb (qpidcommon ${QPID_COMPONENT_COMMON})
931

    
   
933

   
932
set(qpidtypes_SOURCES
934
set(qpidtypes_SOURCES
933
  qpid/types/Exception.cpp
935
  qpid/types/Exception.cpp
934
  qpid/types/Uuid.cpp
936
  qpid/types/Uuid.cpp
935
  qpid/types/Variant.cpp
937
  qpid/types/Variant.cpp
936
  ${qpidtypes_platform_SOURCES}
938
  ${qpidtypes_platform_SOURCES}
937
)
939
)
938
add_msvc_version (qpidtypes library dll)
940
add_msvc_version (qpidtypes library dll)
939
add_library(qpidtypes SHARED ${qpidtypes_SOURCES})
941
add_library(qpidtypes SHARED ${qpidtypes_SOURCES})
940
target_link_libraries(qpidtypes ${qpidtypes_platform_LIBS})
942
target_link_libraries(qpidtypes ${qpidtypes_platform_LIBS})
941
set_target_properties (qpidtypes PROPERTIES VERSION ${qpidtypes_version})
943
set_target_properties (qpidtypes PROPERTIES VERSION ${qpidtypes_version})
942
install(TARGETS qpidtypes
944
install(TARGETS qpidtypes
943
  DESTINATION ${QPID_INSTALL_LIBDIR}
945
  DESTINATION ${QPID_INSTALL_LIBDIR}
944
  COMPONENT ${QPID_COMPONENT_COMMON})
946
  COMPONENT ${QPID_COMPONENT_COMMON})
945
install_pdb (qpidtypes ${QPID_COMPONENT_COMMON})
947
install_pdb (qpidtypes ${QPID_COMPONENT_COMMON})
946

    
   
948

   
947
set (qpidclient_SOURCES
949
set (qpidclient_SOURCES
948
     ${rgen_client_srcs}
950
     ${rgen_client_srcs}
949
     ${qpidclient_platform_SOURCES}
951
     ${qpidclient_platform_SOURCES}
950
     qpid/client/Bounds.cpp
952
     qpid/client/Bounds.cpp
951
     qpid/client/Completion.cpp
953
     qpid/client/Completion.cpp
952
     qpid/client/Connection.cpp
954
     qpid/client/Connection.cpp
953
     qpid/client/ConnectionHandler.cpp
955
     qpid/client/ConnectionHandler.cpp
954
     qpid/client/ConnectionImpl.cpp
956
     qpid/client/ConnectionImpl.cpp
955
     qpid/client/ConnectionSettings.cpp
957
     qpid/client/ConnectionSettings.cpp
956
     qpid/client/Connector.cpp
958
     qpid/client/Connector.cpp
957
     qpid/client/Demux.cpp
959
     qpid/client/Demux.cpp
958
     qpid/client/Dispatcher.cpp
960
     qpid/client/Dispatcher.cpp
959
     qpid/client/FailoverManager.cpp
961
     qpid/client/FailoverManager.cpp
960
     qpid/client/FailoverListener.cpp
962
     qpid/client/FailoverListener.cpp
961
     qpid/client/Future.cpp
963
     qpid/client/Future.cpp
962
     qpid/client/FutureCompletion.cpp
964
     qpid/client/FutureCompletion.cpp
963
     qpid/client/FutureResult.cpp
965
     qpid/client/FutureResult.cpp
964
     qpid/client/LoadPlugins.cpp
966
     qpid/client/LoadPlugins.cpp
965
     qpid/client/LocalQueue.cpp
967
     qpid/client/LocalQueue.cpp
966
     qpid/client/LocalQueueImpl.cpp
968
     qpid/client/LocalQueueImpl.cpp
967
     qpid/client/Message.cpp
969
     qpid/client/Message.cpp
968
     qpid/client/MessageImpl.cpp
970
     qpid/client/MessageImpl.cpp
969
     qpid/client/MessageListener.cpp
971
     qpid/client/MessageListener.cpp
970
     qpid/client/MessageReplayTracker.cpp
972
     qpid/client/MessageReplayTracker.cpp
971
     qpid/client/QueueOptions.cpp
973
     qpid/client/QueueOptions.cpp
972
     qpid/client/Results.cpp
974
     qpid/client/Results.cpp
973
     qpid/client/SessionBase_0_10.cpp
975
     qpid/client/SessionBase_0_10.cpp
974
     qpid/client/SessionBase_0_10Access.h
976
     qpid/client/SessionBase_0_10Access.h
975
     qpid/client/ConnectionAccess.h
977
     qpid/client/ConnectionAccess.h
976
     qpid/client/SessionImpl.cpp
978
     qpid/client/SessionImpl.cpp
977
     qpid/client/StateManager.cpp
979
     qpid/client/StateManager.cpp
978
     qpid/client/Subscription.cpp
980
     qpid/client/Subscription.cpp
979
     qpid/client/SubscriptionImpl.cpp
981
     qpid/client/SubscriptionImpl.cpp
980
     qpid/client/SubscriptionManager.cpp
982
     qpid/client/SubscriptionManager.cpp
981
     qpid/client/SubscriptionManagerImpl.cpp
983
     qpid/client/SubscriptionManagerImpl.cpp
982
     qpid/client/TCPConnector.cpp
984
     qpid/client/TCPConnector.cpp
983
)
985
)
984
add_msvc_version (qpidclient library dll)
986
add_msvc_version (qpidclient library dll)
985

    
   
987

   
986
add_library (qpidclient SHARED ${qpidclient_SOURCES})
988
add_library (qpidclient SHARED ${qpidclient_SOURCES})
987
target_link_libraries (qpidclient qpidcommon ${qpidclient_platform_LIBS})
989
target_link_libraries (qpidclient qpidcommon ${qpidclient_platform_LIBS})
988
set_target_properties (qpidclient PROPERTIES VERSION ${qpidclient_version})
990
set_target_properties (qpidclient PROPERTIES VERSION ${qpidclient_version})
989
install (TARGETS qpidclient
991
install (TARGETS qpidclient
990
         DESTINATION ${QPID_INSTALL_LIBDIR}
992
         DESTINATION ${QPID_INSTALL_LIBDIR}
991
         COMPONENT ${QPID_COMPONENT_CLIENT})
993
         COMPONENT ${QPID_COMPONENT_CLIENT})
992
install (DIRECTORY ../include/qpid
994
install (DIRECTORY ../include/qpid
993
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}
995
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}
994
         COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}
996
         COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}
995
         PATTERN ".svn" EXCLUDE)
997
         PATTERN ".svn" EXCLUDE)
996
install_pdb (qpidclient ${QPID_COMPONENT_CLIENT})
998
install_pdb (qpidclient ${QPID_COMPONENT_CLIENT})
997

    
   
999

   
998

    
   
1000

   
999
set (qpidmessaging_SOURCES
1001
set (qpidmessaging_SOURCES
1000
	 ${qpidmessaging_platform_SOURCES}
1002
	 ${qpidmessaging_platform_SOURCES}
1001
     qpid/messaging/Address.cpp
1003
     qpid/messaging/Address.cpp
1002
     qpid/messaging/AddressParser.h
1004
     qpid/messaging/AddressParser.h
1003
     qpid/messaging/AddressParser.cpp
1005
     qpid/messaging/AddressParser.cpp
1004
     qpid/messaging/Connection.cpp
1006
     qpid/messaging/Connection.cpp
1005
     qpid/messaging/ConnectionImpl.h
1007
     qpid/messaging/ConnectionImpl.h
1006
     qpid/messaging/Duration.cpp
1008
     qpid/messaging/Duration.cpp
1007
     qpid/messaging/exceptions.cpp
1009
     qpid/messaging/exceptions.cpp
1008
     qpid/messaging/Message.cpp
1010
     qpid/messaging/Message.cpp
1009
     qpid/messaging/MessageImpl.h
1011
     qpid/messaging/MessageImpl.h
1010
     qpid/messaging/MessageImpl.cpp
1012
     qpid/messaging/MessageImpl.cpp
1011
     qpid/messaging/Receiver.cpp
1013
     qpid/messaging/Receiver.cpp
1012
     qpid/messaging/ReceiverImpl.h
1014
     qpid/messaging/ReceiverImpl.h
1013
     qpid/messaging/Session.cpp
1015
     qpid/messaging/Session.cpp
1014
     qpid/messaging/SessionImpl.h
1016
     qpid/messaging/SessionImpl.h
1015
     qpid/messaging/Sender.cpp
1017
     qpid/messaging/Sender.cpp
1016
     qpid/messaging/SenderImpl.h
1018
     qpid/messaging/SenderImpl.h
1017
     qpid/messaging/FailoverUpdates.cpp
1019
     qpid/messaging/FailoverUpdates.cpp
1018
     qpid/client/amqp0_10/AcceptTracker.h
1020
     qpid/client/amqp0_10/AcceptTracker.h
1019
     qpid/client/amqp0_10/AcceptTracker.cpp
1021
     qpid/client/amqp0_10/AcceptTracker.cpp
1020
     qpid/client/amqp0_10/AddressResolution.h
1022
     qpid/client/amqp0_10/AddressResolution.h
1021
     qpid/client/amqp0_10/AddressResolution.cpp
1023
     qpid/client/amqp0_10/AddressResolution.cpp
1022
     qpid/client/amqp0_10/ConnectionImpl.h
1024
     qpid/client/amqp0_10/ConnectionImpl.h
1023
     qpid/client/amqp0_10/ConnectionImpl.cpp
1025
     qpid/client/amqp0_10/ConnectionImpl.cpp
1024
     qpid/client/amqp0_10/IncomingMessages.h
1026
     qpid/client/amqp0_10/IncomingMessages.h
1025
     qpid/client/amqp0_10/IncomingMessages.cpp
1027
     qpid/client/amqp0_10/IncomingMessages.cpp
1026
     qpid/client/amqp0_10/MessageSink.h
1028
     qpid/client/amqp0_10/MessageSink.h
1027
     qpid/client/amqp0_10/MessageSource.h
1029
     qpid/client/amqp0_10/MessageSource.h
1028
     qpid/client/amqp0_10/OutgoingMessage.h
1030
     qpid/client/amqp0_10/OutgoingMessage.h
1029
     qpid/client/amqp0_10/OutgoingMessage.cpp
1031
     qpid/client/amqp0_10/OutgoingMessage.cpp
1030
     qpid/client/amqp0_10/ReceiverImpl.h
1032
     qpid/client/amqp0_10/ReceiverImpl.h
1031
     qpid/client/amqp0_10/ReceiverImpl.cpp
1033
     qpid/client/amqp0_10/ReceiverImpl.cpp
1032
     qpid/client/amqp0_10/SessionImpl.h
1034
     qpid/client/amqp0_10/SessionImpl.h
1033
     qpid/client/amqp0_10/SessionImpl.cpp
1035
     qpid/client/amqp0_10/SessionImpl.cpp
1034
     qpid/client/amqp0_10/SenderImpl.h
1036
     qpid/client/amqp0_10/SenderImpl.h
1035
     qpid/client/amqp0_10/SenderImpl.cpp
1037
     qpid/client/amqp0_10/SenderImpl.cpp
1036
)
1038
)
1037
add_msvc_version (qpidmessaging library dll)
1039
add_msvc_version (qpidmessaging library dll)
1038

    
   
1040

   
1039
add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES})
1041
add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES})
1040
target_link_libraries (qpidmessaging qpidclient)
1042
target_link_libraries (qpidmessaging qpidclient)
1041
set_target_properties (qpidmessaging PROPERTIES VERSION ${qpidmessaging_version})
1043
set_target_properties (qpidmessaging PROPERTIES VERSION ${qpidmessaging_version})
1042
install (TARGETS qpidmessaging
1044
install (TARGETS qpidmessaging
1043
         DESTINATION ${QPID_INSTALL_LIBDIR}
1045
         DESTINATION ${QPID_INSTALL_LIBDIR}
1044
         COMPONENT ${QPID_COMPONENT_CLIENT})
1046
         COMPONENT ${QPID_COMPONENT_CLIENT})
1045
install_pdb (qpidmessaging ${QPID_COMPONENT_CLIENT})
1047
install_pdb (qpidmessaging ${QPID_COMPONENT_CLIENT})
1046

    
   
1048

   
1047
# Released source artifacts from Apache have the generated headers included in
1049
# Released source artifacts from Apache have the generated headers included in
1048
# the source tree, not the binary tree. So don't attempt to grab them when
1050
# the source tree, not the binary tree. So don't attempt to grab them when
1049
# they're not supposed to be there.
1051
# they're not supposed to be there.
1050
if (NOT QPID_GENERATED_HEADERS_IN_SOURCE)
1052
if (NOT QPID_GENERATED_HEADERS_IN_SOURCE)
1051
  install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../include/qpid
1053
  install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../include/qpid
1052
           DESTINATION ${QPID_INSTALL_INCLUDEDIR}
1054
           DESTINATION ${QPID_INSTALL_INCLUDEDIR}
1053
           COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE})
1055
           COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE})
1054
endif (NOT QPID_GENERATED_HEADERS_IN_SOURCE)
1056
endif (NOT QPID_GENERATED_HEADERS_IN_SOURCE)
1055

    
   
1057

   
1056

    
   
1058

   
1057
if (MSVC)
1059
if (MSVC)
1058
    # Install the DtcPlugin project and call it qpidxarm.
1060
    # Install the DtcPlugin project and call it qpidxarm.
1059
    set(AMQP_WCF_DIR ${qpid-cpp_SOURCE_DIR}/../wcf)
1061
    set(AMQP_WCF_DIR ${qpid-cpp_SOURCE_DIR}/../wcf)
1060
    set(qpidxarm_SOURCES ${AMQP_WCF_DIR}/src/Apache/Qpid/DtcPlugin/DtcPlugin.cpp)
1062
    set(qpidxarm_SOURCES ${AMQP_WCF_DIR}/src/Apache/Qpid/DtcPlugin/DtcPlugin.cpp)
1061
    if (EXISTS ${qpidxarm_SOURCES})
1063
    if (EXISTS ${qpidxarm_SOURCES})
1062
        add_msvc_version (qpidxarm library dll)
1064
        add_msvc_version (qpidxarm library dll)
1063
        add_library (qpidxarm SHARED ${qpidxarm_SOURCES})
1065
        add_library (qpidxarm SHARED ${qpidxarm_SOURCES})
1064
        target_link_libraries (qpidxarm qpidclient qpidcommon)
1066
        target_link_libraries (qpidxarm qpidclient qpidcommon)
1065
        install (TARGETS qpidxarm
1067
        install (TARGETS qpidxarm
1066
                 DESTINATION ${QPID_INSTALL_LIBDIR}
1068
                 DESTINATION ${QPID_INSTALL_LIBDIR}
1067
                 COMPONENT ${QPID_COMPONENT_CLIENT})
1069
                 COMPONENT ${QPID_COMPONENT_CLIENT})
1068
        install_pdb (qpidxarm ${QPID_COMPONENT_CLIENT})
1070
        install_pdb (qpidxarm ${QPID_COMPONENT_CLIENT})
1069
    endif (EXISTS ${qpidxarm_SOURCES})
1071
    endif (EXISTS ${qpidxarm_SOURCES})
1070
endif (MSVC)
1072
endif (MSVC)
1071

    
   
1073

   
1072
set (qpidbroker_SOURCES
1074
set (qpidbroker_SOURCES
1073
     ${mgen_broker_cpp}
1075
     ${mgen_broker_cpp}
1074
     ${qpidbroker_platform_SOURCES}
1076
     ${qpidbroker_platform_SOURCES}
1075
     qpid/amqp_0_10/Connection.h
1077
     qpid/amqp_0_10/Connection.h
1076
     qpid/amqp_0_10/Connection.cpp
1078
     qpid/amqp_0_10/Connection.cpp
1077
     qpid/broker/Broker.cpp
1079
     qpid/broker/Broker.cpp
1078
     qpid/broker/Credit.cpp
1080
     qpid/broker/Credit.cpp
1079
     qpid/broker/Exchange.cpp
1081
     qpid/broker/Exchange.cpp
1080
     qpid/broker/ExpiryPolicy.cpp
1082
     qpid/broker/ExpiryPolicy.cpp
1081
     qpid/broker/Fairshare.cpp
1083
     qpid/broker/Fairshare.cpp
1082
     qpid/broker/LegacyLVQ.cpp
1084
     qpid/broker/LegacyLVQ.cpp
1083
     qpid/broker/MessageDeque.cpp
1085
     qpid/broker/MessageDeque.cpp
1084
     qpid/broker/MessageMap.cpp
1086
     qpid/broker/MessageMap.cpp
1085
     qpid/broker/PriorityQueue.cpp
1087
     qpid/broker/PriorityQueue.cpp
1086
     qpid/broker/Queue.cpp
1088
     qpid/broker/Queue.cpp
1087
     qpid/broker/QueueCleaner.cpp
1089
     qpid/broker/QueueCleaner.cpp
1088
     qpid/broker/QueueListeners.cpp
1090
     qpid/broker/QueueListeners.cpp
1089
     qpid/broker/FifoDistributor.cpp
1091
     qpid/broker/FifoDistributor.cpp
1090
     qpid/broker/MessageGroupManager.cpp
1092
     qpid/broker/MessageGroupManager.cpp
1091
     qpid/broker/PersistableMessage.cpp
1093
     qpid/broker/PersistableMessage.cpp
1092
     qpid/broker/Bridge.cpp
1094
     qpid/broker/Bridge.cpp
1093
     qpid/broker/Connection.cpp
1095
     qpid/broker/Connection.cpp
1094
     qpid/broker/ConnectionHandler.cpp
1096
     qpid/broker/ConnectionHandler.cpp
1095
     qpid/broker/ConnectionFactory.cpp
1097
     qpid/broker/ConnectionFactory.cpp
1096
     qpid/broker/DeliverableMessage.cpp
1098
     qpid/broker/DeliverableMessage.cpp
1097
     qpid/broker/DeliveryRecord.cpp
1099
     qpid/broker/DeliveryRecord.cpp
1098
     qpid/broker/DirectExchange.cpp
1100
     qpid/broker/DirectExchange.cpp
1099
     qpid/broker/DtxAck.cpp
1101
     qpid/broker/DtxAck.cpp
1100
     qpid/broker/DtxBuffer.cpp
1102
     qpid/broker/DtxBuffer.cpp
1101
     qpid/broker/DtxManager.cpp
1103
     qpid/broker/DtxManager.cpp
1102
     qpid/broker/DtxTimeout.cpp
1104
     qpid/broker/DtxTimeout.cpp
1103
     qpid/broker/DtxWorkRecord.cpp
1105
     qpid/broker/DtxWorkRecord.cpp
1104
     qpid/broker/ExchangeRegistry.cpp
1106
     qpid/broker/ExchangeRegistry.cpp
1105
     qpid/broker/FanOutExchange.cpp
1107
     qpid/broker/FanOutExchange.cpp
1106
     qpid/broker/HeadersExchange.cpp
1108
     qpid/broker/HeadersExchange.cpp
1107
     qpid/broker/Link.cpp
1109
     qpid/broker/Link.cpp
1108
     qpid/broker/LinkRegistry.cpp
1110
     qpid/broker/LinkRegistry.cpp
1109
     qpid/broker/Message.cpp
1111
     qpid/broker/Message.cpp
1110
     qpid/broker/MessageAdapter.cpp
1112
     qpid/broker/MessageAdapter.cpp
1111
     qpid/broker/MessageBuilder.cpp
1113
     qpid/broker/MessageBuilder.cpp
1112
     qpid/broker/MessageStoreModule.cpp
1114
     qpid/broker/MessageStoreModule.cpp
1113
     qpid/broker/NameGenerator.cpp
1115
     qpid/broker/NameGenerator.cpp
1114
     qpid/broker/NullMessageStore.cpp
1116
     qpid/broker/NullMessageStore.cpp
1115
     qpid/broker/QueueBindings.cpp
1117
     qpid/broker/QueueBindings.cpp
1116
     qpid/broker/QueuedMessage.cpp
1118
     qpid/broker/QueuedMessage.cpp
1117
     qpid/broker/QueueEvents.cpp
1119
     qpid/broker/QueueEvents.cpp
1118
     qpid/broker/QueuePolicy.cpp
1120
     qpid/broker/QueuePolicy.cpp
1119
     qpid/broker/QueueRegistry.cpp
1121
     qpid/broker/QueueRegistry.cpp
1120
     qpid/broker/QueueFlowLimit.cpp
1122
     qpid/broker/QueueFlowLimit.cpp
1121
     qpid/broker/RecoveryManagerImpl.cpp
1123
     qpid/broker/RecoveryManagerImpl.cpp
1122
     qpid/broker/RecoveredEnqueue.cpp
1124
     qpid/broker/RecoveredEnqueue.cpp
1123
     qpid/broker/RecoveredDequeue.cpp
1125
     qpid/broker/RecoveredDequeue.cpp
1124
     qpid/broker/RetryList.cpp
1126
     qpid/broker/RetryList.cpp
1125
     qpid/broker/SecureConnection.cpp
1127
     qpid/broker/SecureConnection.cpp
1126
     qpid/broker/SecureConnectionFactory.cpp
1128
     qpid/broker/SecureConnectionFactory.cpp
1127
     qpid/broker/SemanticState.h
1129
     qpid/broker/SemanticState.h
1128
     qpid/broker/SemanticState.cpp
1130
     qpid/broker/SemanticState.cpp
1129
     qpid/broker/SessionAdapter.cpp
1131
     qpid/broker/SessionAdapter.cpp
1130
     qpid/broker/SessionState.h
1132
     qpid/broker/SessionState.h
1131
     qpid/broker/SessionState.cpp
1133
     qpid/broker/SessionState.cpp
1132
     qpid/broker/SessionManager.h
1134
     qpid/broker/SessionManager.h
1133
     qpid/broker/SessionManager.cpp
1135
     qpid/broker/SessionManager.cpp
1134
     qpid/broker/SessionContext.h
1136
     qpid/broker/SessionContext.h
1135
     qpid/broker/SessionHandler.h
1137
     qpid/broker/SessionHandler.h
1136
     qpid/broker/SessionHandler.cpp
1138
     qpid/broker/SessionHandler.cpp
1137
     qpid/broker/System.cpp
1139
     qpid/broker/System.cpp
1138
     qpid/broker/ThresholdAlerts.cpp
1140
     qpid/broker/ThresholdAlerts.cpp
1139
     qpid/broker/TopicExchange.cpp
1141
     qpid/broker/TopicExchange.cpp
1140
     qpid/broker/TxAccept.cpp
1142
     qpid/broker/TxAccept.cpp
1141
     qpid/broker/TxBuffer.cpp
1143
     qpid/broker/TxBuffer.cpp
1142
     qpid/broker/TxPublish.cpp
1144
     qpid/broker/TxPublish.cpp
1143
     qpid/broker/Vhost.cpp
1145
     qpid/broker/Vhost.cpp
1144
     qpid/management/ManagementAgent.cpp
1146
     qpid/management/ManagementAgent.cpp
1145
     qpid/management/ManagementDirectExchange.cpp
1147
     qpid/management/ManagementDirectExchange.cpp
1146
     qpid/management/ManagementTopicExchange.cpp
1148
     qpid/management/ManagementTopicExchange.cpp
1147
     qpid/sys/TCPIOPlugin.cpp
1149
     qpid/sys/TCPIOPlugin.cpp
1148
)
1150
)
1149
add_msvc_version (qpidbroker library dll)
1151
add_msvc_version (qpidbroker library dll)
1150
add_library (qpidbroker SHARED ${qpidbroker_SOURCES})
1152
add_library (qpidbroker SHARED ${qpidbroker_SOURCES})
1151
target_link_libraries (qpidbroker qpidcommon ${qpidbroker_platform_LIBS})
1153
target_link_libraries (qpidbroker qpidcommon ${qpidbroker_platform_LIBS})
1152
set_target_properties (qpidbroker PROPERTIES VERSION ${qpidbroker_version})
1154
set_target_properties (qpidbroker PROPERTIES VERSION ${qpidbroker_version})
1153
if (MSVC)
1155
if (MSVC)
1154
  set_target_properties (qpidbroker PROPERTIES COMPILE_FLAGS /wd4290)
1156
  set_target_properties (qpidbroker PROPERTIES COMPILE_FLAGS /wd4290)
1155
endif (MSVC)
1157
endif (MSVC)
1156
install (TARGETS qpidbroker
1158
install (TARGETS qpidbroker
1157
         DESTINATION ${QPID_INSTALL_LIBDIR}
1159
         DESTINATION ${QPID_INSTALL_LIBDIR}
1158
         COMPONENT ${QPID_COMPONENT_BROKER})
1160
         COMPONENT ${QPID_COMPONENT_BROKER})
1159
install_pdb (qpidbroker ${QPID_COMPONENT_BROKER})
1161
install_pdb (qpidbroker ${QPID_COMPONENT_BROKER})
1160

    
   
1162

   
1161

    
   
1163

   
1162
set (qpidd_SOURCES
1164
set (qpidd_SOURCES
1163
     ${qpidd_platform_SOURCES}
1165
     ${qpidd_platform_SOURCES}
1164
     qpidd.cpp
1166
     qpidd.cpp
1165
     qpidd.h
1167
     qpidd.h
1166
)
1168
)
1167
add_msvc_version (qpidd application exe)
1169
add_msvc_version (qpidd application exe)
1168
add_executable (qpidd ${qpidd_SOURCES})
1170
add_executable (qpidd ${qpidd_SOURCES})
1169
target_link_libraries (qpidd qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY}
1171
target_link_libraries (qpidd qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY}
1170
                          ${Boost_FILESYSTEM_LIBRARY})
1172
                          ${Boost_FILESYSTEM_LIBRARY})
1171
install (TARGETS qpidd RUNTIME
1173
install (TARGETS qpidd RUNTIME
1172
         DESTINATION ${QPID_INSTALL_SBINDIR}
1174
         DESTINATION ${QPID_INSTALL_SBINDIR}
1173
         COMPONENT ${QPID_COMPONENT_BROKER})
1175
         COMPONENT ${QPID_COMPONENT_BROKER})
1174
if (CPACK_GENERATOR STREQUAL "NSIS")
1176
if (CPACK_GENERATOR STREQUAL "NSIS")
1175
    set (CPACK_NSIS_MENU_LINKS
1177
    set (CPACK_NSIS_MENU_LINKS
1176
         "qpidd" "Start Qpid Broker")
1178
         "qpidd" "Start Qpid Broker")
1177
endif (CPACK_GENERATOR STREQUAL "NSIS")
1179
endif (CPACK_GENERATOR STREQUAL "NSIS")
1178

    
   
1180

   
1179
if (UNIX)
1181
if (UNIX)
1180
  install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/lib/qpidd)")
1182
  install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/lib/qpidd)")
1181
  install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/spool/qpidd)")
1183
  install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/spool/qpidd)")
1182
endif (UNIX)
1184
endif (UNIX)
1183

    
   
1185

   
1184
set (qmf_SOURCES
1186
set (qmf_SOURCES
1185
    qpid/agent/ManagementAgentImpl.cpp
1187
    qpid/agent/ManagementAgentImpl.cpp
1186
    qpid/agent/ManagementAgentImpl.h
1188
    qpid/agent/ManagementAgentImpl.h
1187
    )
1189
    )
1188
set (qmf_HEADERS
1190
set (qmf_HEADERS
1189
  ../include/qpid/agent/ManagementAgent.h
1191
  ../include/qpid/agent/ManagementAgent.h
1190
  ../include/qpid/agent/QmfAgentImportExport.h
1192
  ../include/qpid/agent/QmfAgentImportExport.h
1191
    )
1193
    )
1192

    
   
1194

   
1193
add_msvc_version (qmf library dll)
1195
add_msvc_version (qmf library dll)
1194
add_library (qmf SHARED ${qmf_SOURCES})
1196
add_library (qmf SHARED ${qmf_SOURCES})
1195
target_link_libraries (qmf qmfengine)
1197
target_link_libraries (qmf qmfengine)
1196
set_target_properties (qmf PROPERTIES
1198
set_target_properties (qmf PROPERTIES
1197
                       VERSION ${qmf_version})
1199
                       VERSION ${qmf_version})
1198
install (TARGETS qmf OPTIONAL
1200
install (TARGETS qmf OPTIONAL
1199
         DESTINATION ${QPID_INSTALL_LIBDIR}
1201
         DESTINATION ${QPID_INSTALL_LIBDIR}
1200
         COMPONENT ${QPID_COMPONENT_QMF})
1202
         COMPONENT ${QPID_COMPONENT_QMF})
1201
install (FILES ${qmf_HEADERS}
1203
install (FILES ${qmf_HEADERS}
1202
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/agent
1204
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/agent
1203
         COMPONENT ${QPID_COMPONENT_QMF})
1205
         COMPONENT ${QPID_COMPONENT_QMF})
1204
install_pdb (qmf ${QPID_COMPONENT_QMF})
1206
install_pdb (qmf ${QPID_COMPONENT_QMF})
1205

    
   
1207

   
1206
if(NOT WIN32)
1208
if(NOT WIN32)
1207
    set (qmf2_HEADERS
1209
    set (qmf2_HEADERS
1208
        ../include/qmf/AgentEvent.h
1210
        ../include/qmf/AgentEvent.h
1209
        ../include/qmf/Agent.h
1211
        ../include/qmf/Agent.h
1210
        ../include/qmf/AgentSession.h
1212
        ../include/qmf/AgentSession.h
1211
        ../include/qmf/ConsoleEvent.h
1213
        ../include/qmf/ConsoleEvent.h
1212
        ../include/qmf/ConsoleSession.h
1214
        ../include/qmf/ConsoleSession.h
1213
        ../include/qmf/DataAddr.h
1215
        ../include/qmf/DataAddr.h
1214
        ../include/qmf/Data.h
1216
        ../include/qmf/Data.h
1215
        ../include/qmf/exceptions.h
1217
        ../include/qmf/exceptions.h
1216
        ../include/qmf/Handle.h
1218
        ../include/qmf/Handle.h
1217
        ../include/qmf/ImportExport.h
1219
        ../include/qmf/ImportExport.h
1218
        ../include/qmf/posix/EventNotifier.h
1220
        ../include/qmf/posix/EventNotifier.h
1219
        ../include/qmf/Query.h
1221
        ../include/qmf/Query.h
1220
        ../include/qmf/Schema.h
1222
        ../include/qmf/Schema.h
1221
        ../include/qmf/SchemaId.h
1223
        ../include/qmf/SchemaId.h
1222
        ../include/qmf/SchemaMethod.h
1224
        ../include/qmf/SchemaMethod.h
1223
        ../include/qmf/SchemaProperty.h
1225
        ../include/qmf/SchemaProperty.h
1224
        ../include/qmf/SchemaTypes.h
1226
        ../include/qmf/SchemaTypes.h
1225
        ../include/qmf/Subscription.h
1227
        ../include/qmf/Subscription.h
1226
        )
1228
        )
1227

    
   
1229

   
1228
    set (qmf2_SOURCES
1230
    set (qmf2_SOURCES
1229
        ${qmf2_HEADERS}
1231
        ${qmf2_HEADERS}
1230
        qmf/agentCapability.h
1232
        qmf/agentCapability.h
1231
        qmf/Agent.cpp
1233
        qmf/Agent.cpp
1232
        qmf/AgentEvent.cpp
1234
        qmf/AgentEvent.cpp
1233
        qmf/AgentEventImpl.h
1235
        qmf/AgentEventImpl.h
1234
        qmf/AgentImpl.h
1236
        qmf/AgentImpl.h
1235
        qmf/AgentSession.cpp
1237
        qmf/AgentSession.cpp
1236
        qmf/AgentSubscription.cpp
1238
        qmf/AgentSubscription.cpp
1237
        qmf/AgentSubscription.h
1239
        qmf/AgentSubscription.h
1238
        qmf/ConsoleEvent.cpp
1240
        qmf/ConsoleEvent.cpp
1239
        qmf/ConsoleEventImpl.h
1241
        qmf/ConsoleEventImpl.h
1240
        qmf/ConsoleSession.cpp
1242
        qmf/ConsoleSession.cpp
1241
        qmf/ConsoleSessionImpl.h
1243
        qmf/ConsoleSessionImpl.h
1242
        qmf/constants.cpp
1244
        qmf/constants.cpp
1243
        qmf/constants.h
1245
        qmf/constants.h
1244
        qmf/DataAddr.cpp
1246
        qmf/DataAddr.cpp
1245
        qmf/DataAddrImpl.h
1247
        qmf/DataAddrImpl.h
1246
        qmf/Data.cpp
1248
        qmf/Data.cpp
1247
        qmf/DataImpl.h
1249
        qmf/DataImpl.h
1248
        qmf/EventNotifierImpl.h
1250
        qmf/EventNotifierImpl.h
1249
        qmf/EventNotifierImpl.cpp
1251
        qmf/EventNotifierImpl.cpp
1250
        qmf/PosixEventNotifier.cpp
1252
        qmf/PosixEventNotifier.cpp
1251
        qmf/PosixEventNotifierImpl.cpp
1253
        qmf/PosixEventNotifierImpl.cpp
1252
        qmf/exceptions.cpp
1254
        qmf/exceptions.cpp
1253
        qmf/Expression.cpp
1255
        qmf/Expression.cpp
1254
        qmf/Expression.h
1256
        qmf/Expression.h
1255
        qmf/Hash.cpp
1257
        qmf/Hash.cpp
1256
        qmf/Hash.h
1258
        qmf/Hash.h
1257
        qmf/PrivateImplRef.h
1259
        qmf/PrivateImplRef.h
1258
        qmf/Query.cpp
1260
        qmf/Query.cpp
1259
        qmf/QueryImpl.h
1261
        qmf/QueryImpl.h
1260
        qmf/Schema.cpp
1262
        qmf/Schema.cpp
1261
        qmf/SchemaCache.cpp
1263
        qmf/SchemaCache.cpp
1262
        qmf/SchemaCache.h
1264
        qmf/SchemaCache.h
1263
        qmf/SchemaId.cpp
1265
        qmf/SchemaId.cpp
1264
        qmf/SchemaIdImpl.h
1266
        qmf/SchemaIdImpl.h
1265
        qmf/SchemaImpl.h
1267
        qmf/SchemaImpl.h
1266
        qmf/SchemaMethod.cpp
1268
        qmf/SchemaMethod.cpp
1267
        qmf/SchemaMethodImpl.h
1269
        qmf/SchemaMethodImpl.h
1268
        qmf/SchemaProperty.cpp
1270
        qmf/SchemaProperty.cpp
1269
        qmf/SchemaPropertyImpl.h
1271
        qmf/SchemaPropertyImpl.h
1270
        qmf/Subscription.cpp
1272
        qmf/Subscription.cpp
1271
        qmf/SubscriptionImpl.h
1273
        qmf/SubscriptionImpl.h
1272
        )
1274
        )
1273

    
   
1275

   
1274
    add_msvc_version (qmf2 library dll)
1276
    add_msvc_version (qmf2 library dll)
1275
    add_library (qmf2 SHARED ${qmf2_SOURCES})
1277
    add_library (qmf2 SHARED ${qmf2_SOURCES})
1276
    target_link_libraries (qmf2 qpidmessaging qpidtypes qpidclient qpidcommon)
1278
    target_link_libraries (qmf2 qpidmessaging qpidtypes qpidclient qpidcommon)
1277
    set_target_properties (qmf2 PROPERTIES
1279
    set_target_properties (qmf2 PROPERTIES
1278
                        VERSION ${qmf2_version})
1280
                        VERSION ${qmf2_version})
1279
    install (TARGETS qmf2 OPTIONAL
1281
    install (TARGETS qmf2 OPTIONAL
1280
            DESTINATION ${QPID_INSTALL_LIBDIR}
1282
            DESTINATION ${QPID_INSTALL_LIBDIR}
1281
            COMPONENT ${QPID_COMPONENT_QMF})
1283
            COMPONENT ${QPID_COMPONENT_QMF})
1282
    install (FILES ${qmf2_HEADERS}
1284
    install (FILES ${qmf2_HEADERS}
1283
            DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qmf
1285
            DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qmf
1284
            COMPONENT ${QPID_COMPONENT_QMF})
1286
            COMPONENT ${QPID_COMPONENT_QMF})
1285
    install_pdb (qmf2 ${QPID_COMPONENT_QMF})
1287
    install_pdb (qmf2 ${QPID_COMPONENT_QMF})
1286
endif (NOT WIN32)
1288
endif (NOT WIN32)
1287

    
   
1289

   
1288
set (qmfengine_SOURCES
1290
set (qmfengine_SOURCES
1289
     qmf/engine/Agent.cpp
1291
     qmf/engine/Agent.cpp
1290
     qmf/engine/BrokerProxyImpl.cpp
1292
     qmf/engine/BrokerProxyImpl.cpp
1291
     qmf/engine/BrokerProxyImpl.h
1293
     qmf/engine/BrokerProxyImpl.h
1292
     qmf/engine/ConnectionSettingsImpl.cpp
1294
     qmf/engine/ConnectionSettingsImpl.cpp
1293
     qmf/engine/ConnectionSettingsImpl.h
1295
     qmf/engine/ConnectionSettingsImpl.h
1294
     qmf/engine/ConsoleImpl.cpp
1296
     qmf/engine/ConsoleImpl.cpp
1295
     qmf/engine/ConsoleImpl.h
1297
     qmf/engine/ConsoleImpl.h
1296
     qmf/engine/EventImpl.cpp
1298
     qmf/engine/EventImpl.cpp
1297
     qmf/engine/EventImpl.h
1299
     qmf/engine/EventImpl.h
1298
     qmf/engine/MessageImpl.cpp
1300
     qmf/engine/MessageImpl.cpp
1299
     qmf/engine/MessageImpl.h
1301
     qmf/engine/MessageImpl.h
1300
     qmf/engine/ObjectIdImpl.cpp
1302
     qmf/engine/ObjectIdImpl.cpp
1301
     qmf/engine/ObjectIdImpl.h
1303
     qmf/engine/ObjectIdImpl.h
1302
     qmf/engine/ObjectImpl.cpp
1304
     qmf/engine/ObjectImpl.cpp
1303
     qmf/engine/ObjectImpl.h
1305
     qmf/engine/ObjectImpl.h
1304
     qmf/engine/Protocol.cpp
1306
     qmf/engine/Protocol.cpp
1305
     qmf/engine/Protocol.h
1307
     qmf/engine/Protocol.h
1306
     qmf/engine/QueryImpl.cpp
1308
     qmf/engine/QueryImpl.cpp
1307
     qmf/engine/QueryImpl.h
1309
     qmf/engine/QueryImpl.h
1308
     qmf/engine/SequenceManager.cpp
1310
     qmf/engine/SequenceManager.cpp
1309
     qmf/engine/SequenceManager.h
1311
     qmf/engine/SequenceManager.h
1310
     qmf/engine/SchemaImpl.cpp
1312
     qmf/engine/SchemaImpl.cpp
1311
     qmf/engine/SchemaImpl.h
1313
     qmf/engine/SchemaImpl.h
1312
     qmf/engine/ValueImpl.cpp
1314
     qmf/engine/ValueImpl.cpp
1313
     qmf/engine/ValueImpl.h
1315
     qmf/engine/ValueImpl.h
1314
    )
1316
    )
1315

    
   
1317

   
1316
set (qmfengine_HEADERS
1318
set (qmfengine_HEADERS
1317
  ../include/qmf/engine/Agent.h
1319
  ../include/qmf/engine/Agent.h
1318
  ../include/qmf/engine/ConnectionSettings.h
1320
  ../include/qmf/engine/ConnectionSettings.h
1319
  ../include/qmf/engine/Console.h
1321
  ../include/qmf/engine/Console.h
1320
  ../include/qmf/engine/Event.h
1322
  ../include/qmf/engine/Event.h
1321
  ../include/qmf/engine/Message.h
1323
  ../include/qmf/engine/Message.h
1322
  ../include/qmf/engine/Object.h
1324
  ../include/qmf/engine/Object.h
1323
  ../include/qmf/engine/ObjectId.h
1325
  ../include/qmf/engine/ObjectId.h
1324
  ../include/qmf/engine/QmfEngineImportExport.h
1326
  ../include/qmf/engine/QmfEngineImportExport.h
1325
  ../include/qmf/engine/Query.h
1327
  ../include/qmf/engine/Query.h
1326
  ../include/qmf/engine/ResilientConnection.h
1328
  ../include/qmf/engine/ResilientConnection.h
1327
  ../include/qmf/engine/Schema.h
1329
  ../include/qmf/engine/Schema.h
1328
  ../include/qmf/engine/Typecode.h
1330
  ../include/qmf/engine/Typecode.h
1329
  ../include/qmf/engine/Value.h
1331
  ../include/qmf/engine/Value.h
1330
    )
1332
    )
1331
install (FILES ${qmfengine_HEADERS}
1333
install (FILES ${qmfengine_HEADERS}
1332
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qmf/engine
1334
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qmf/engine
1333
         COMPONENT ${QPID_COMPONENT_QMF})
1335
         COMPONENT ${QPID_COMPONENT_QMF})
1334

    
   
1336

   
1335
if (NOT WIN32)
1337
if (NOT WIN32)
1336
    list(APPEND qmfengine_SOURCES qmf/engine/ResilientConnection.cpp)
1338
    list(APPEND qmfengine_SOURCES qmf/engine/ResilientConnection.cpp)
1337
endif (NOT WIN32)
1339
endif (NOT WIN32)
1338
add_msvc_version (qmfengine library dll)
1340
add_msvc_version (qmfengine library dll)
1339

    
   
1341

   
1340
add_library (qmfengine SHARED ${qmfengine_SOURCES})
1342
add_library (qmfengine SHARED ${qmfengine_SOURCES})
1341
target_link_libraries (qmfengine qpidclient)
1343
target_link_libraries (qmfengine qpidclient)
1342
set_target_properties (qmfengine PROPERTIES
1344
set_target_properties (qmfengine PROPERTIES
1343
                       VERSION ${qmfengine_version})
1345
                       VERSION ${qmfengine_version})
1344
install (TARGETS qmfengine OPTIONAL
1346
install (TARGETS qmfengine OPTIONAL
1345
         DESTINATION ${QPID_INSTALL_LIBDIR}
1347
         DESTINATION ${QPID_INSTALL_LIBDIR}
1346
         COMPONENT ${QPID_COMPONENT_QMF})
1348
         COMPONENT ${QPID_COMPONENT_QMF})
1347
install_pdb (qmfengine ${QPID_COMPONENT_QMF})
1349
install_pdb (qmfengine ${QPID_COMPONENT_QMF})
1348

    
   
1350

   
1349
set (qmfconsole_SOURCES
1351
set (qmfconsole_SOURCES
1350
     qpid/console/Agent.cpp
1352
     qpid/console/Agent.cpp
1351
     qpid/console/Broker.cpp
1353
     qpid/console/Broker.cpp
1352
     qpid/console/ClassKey.cpp
1354
     qpid/console/ClassKey.cpp
1353
     qpid/console/Event.cpp
1355
     qpid/console/Event.cpp
1354
     qpid/console/Object.cpp
1356
     qpid/console/Object.cpp
1355
     qpid/console/ObjectId.cpp
1357
     qpid/console/ObjectId.cpp
1356
     qpid/console/Package.cpp
1358
     qpid/console/Package.cpp
1357
     qpid/console/Schema.cpp
1359
     qpid/console/Schema.cpp
1358
     qpid/console/SequenceManager.cpp
1360
     qpid/console/SequenceManager.cpp
1359
     qpid/console/SessionManager.cpp
1361
     qpid/console/SessionManager.cpp
1360
     qpid/console/Value.cpp
1362
     qpid/console/Value.cpp
1361
    )
1363
    )
1362
set (qmfconsole_HEADERS
1364
set (qmfconsole_HEADERS
1363
     ../include/qpid/console/Agent.h
1365
     ../include/qpid/console/Agent.h
1364
     ../include/qpid/console/Broker.h
1366
     ../include/qpid/console/Broker.h
1365
     ../include/qpid/console/ClassKey.h
1367
     ../include/qpid/console/ClassKey.h
1366
     ../include/qpid/console/ConsoleImportExport.h
1368
     ../include/qpid/console/ConsoleImportExport.h
1367
     ../include/qpid/console/ConsoleListener.h
1369
     ../include/qpid/console/ConsoleListener.h
1368
     ../include/qpid/console/Event.h
1370
     ../include/qpid/console/Event.h
1369
     ../include/qpid/console/Object.h
1371
     ../include/qpid/console/Object.h
1370
     ../include/qpid/console/ObjectId.h
1372
     ../include/qpid/console/ObjectId.h
1371
     ../include/qpid/console/Package.h
1373
     ../include/qpid/console/Package.h
1372
     ../include/qpid/console/Schema.h
1374
     ../include/qpid/console/Schema.h
1373
     ../include/qpid/console/SequenceManager.h
1375
     ../include/qpid/console/SequenceManager.h
1374
     ../include/qpid/console/SessionManager.h
1376
     ../include/qpid/console/SessionManager.h
1375
     ../include/qpid/console/Value.h
1377
     ../include/qpid/console/Value.h
1376
    )
1378
    )
1377
add_msvc_version (qmfconsole library dll)
1379
add_msvc_version (qmfconsole library dll)
1378
add_library (qmfconsole SHARED ${qmfconsole_SOURCES})
1380
add_library (qmfconsole SHARED ${qmfconsole_SOURCES})
1379
target_link_libraries (qmfconsole qpidclient)
1381
target_link_libraries (qmfconsole qpidclient)
1380
set_target_properties (qmfconsole PROPERTIES
1382
set_target_properties (qmfconsole PROPERTIES
1381
                       VERSION ${qmfconsole_version})
1383
                       VERSION ${qmfconsole_version})
1382
install (TARGETS qmfconsole
1384
install (TARGETS qmfconsole
1383
         DESTINATION ${QPID_INSTALL_LIBDIR}
1385
         DESTINATION ${QPID_INSTALL_LIBDIR}
1384
         COMPONENT ${QPID_COMPONENT_QMF})
1386
         COMPONENT ${QPID_COMPONENT_QMF})
1385
install (FILES ${qmfconsole_HEADERS}
1387
install (FILES ${qmfconsole_HEADERS}
1386
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/console
1388
         DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/console
1387
         COMPONENT ${QPID_COMPONENT_QMF})
1389
         COMPONENT ${QPID_COMPONENT_QMF})
1388
install_pdb (qmfconsole ${QPID_COMPONENT_QMF})
1390
install_pdb (qmfconsole ${QPID_COMPONENT_QMF})
1389

    
   
1391

   
1390
# A queue event listener plugin that creates messages on a replication
1392
# A queue event listener plugin that creates messages on a replication
1391
# queue corresponding to enqueue and dequeue events:
1393
# queue corresponding to enqueue and dequeue events:
1392
set (replicating_listener_SOURCES
1394
set (replicating_listener_SOURCES
1393
     qpid/replication/constants.h
1395
     qpid/replication/constants.h
1394
     qpid/replication/ReplicatingEventListener.cpp
1396
     qpid/replication/ReplicatingEventListener.cpp
1395
     qpid/replication/ReplicatingEventListener.h
1397
     qpid/replication/ReplicatingEventListener.h
1396
    )
1398
    )
1397
add_msvc_version (replicating_listener library dll)
1399
add_msvc_version (replicating_listener library dll)
1398
add_library (replicating_listener MODULE ${replicating_listener_SOURCES})
1400
add_library (replicating_listener MODULE ${replicating_listener_SOURCES})
1399
target_link_libraries (replicating_listener qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
1401
target_link_libraries (replicating_listener qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
1400
set_target_properties (replicating_listener PROPERTIES PREFIX "")
1402
set_target_properties (replicating_listener PROPERTIES PREFIX "")
1401
if (CMAKE_COMPILER_IS_GNUCXX)
1403
if (CMAKE_COMPILER_IS_GNUCXX)
1402
  set_target_properties(replicating_listener PROPERTIES
1404
  set_target_properties(replicating_listener PROPERTIES
1403
                        LINK_FLAGS "${GCC_CATCH_UNDEFINED}")
1405
                        LINK_FLAGS "${GCC_CATCH_UNDEFINED}")
1404
endif (CMAKE_COMPILER_IS_GNUCXX)
1406
endif (CMAKE_COMPILER_IS_GNUCXX)
1405
install (TARGETS replicating_listener
1407
install (TARGETS replicating_listener
1406
         DESTINATION ${QPIDD_MODULE_DIR}
1408
         DESTINATION ${QPIDD_MODULE_DIR}
1407
         COMPONENT ${QPID_COMPONENT_BROKER})
1409
         COMPONENT ${QPID_COMPONENT_BROKER})
1408

    
   
1410

   
1409
# A custom exchange plugin that allows an exchange to be created that
1411
# A custom exchange plugin that allows an exchange to be created that
1410
# can process the messages from a replication queue (populated on the
1412
# can process the messages from a replication queue (populated on the
1411
# source system by the replicating listener plugin above) and take the
1413
# source system by the replicating listener plugin above) and take the
1412
# corresponding action on the local queues
1414
# corresponding action on the local queues
1413
set (replication_exchange_SOURCES
1415
set (replication_exchange_SOURCES
1414
     qpid/replication/constants.h
1416
     qpid/replication/constants.h
1415
     qpid/replication/ReplicationExchange.cpp
1417
     qpid/replication/ReplicationExchange.cpp
1416
     qpid/replication/ReplicationExchange.h
1418
     qpid/replication/ReplicationExchange.h
1417
    )
1419
    )
1418
add_msvc_version (replication_exchange library dll)
1420
add_msvc_version (replication_exchange library dll)
1419
add_library (replication_exchange MODULE ${replication_exchange_SOURCES})
1421
add_library (replication_exchange MODULE ${replication_exchange_SOURCES})
1420
target_link_libraries (replication_exchange qpidbroker)
1422
target_link_libraries (replication_exchange qpidbroker)
1421
set_target_properties (replication_exchange PROPERTIES PREFIX "")
1423
set_target_properties (replication_exchange PROPERTIES PREFIX "")
1422
if (CMAKE_COMPILER_IS_GNUCXX)
1424
if (CMAKE_COMPILER_IS_GNUCXX)
1423
  set_target_properties(replication_exchange PROPERTIES
1425
  set_target_properties(replication_exchange PROPERTIES
1424
                        LINK_FLAGS "${GCC_CATCH_UNDEFINED}")
1426
                        LINK_FLAGS "${GCC_CATCH_UNDEFINED}")
1425
endif (CMAKE_COMPILER_IS_GNUCXX)
1427
endif (CMAKE_COMPILER_IS_GNUCXX)
1426
install (TARGETS replication_exchange
1428
install (TARGETS replication_exchange
1427
         DESTINATION ${QPIDD_MODULE_DIR}
1429
         DESTINATION ${QPIDD_MODULE_DIR}
1428
         COMPONENT ${QPID_COMPONENT_BROKER})
1430
         COMPONENT ${QPID_COMPONENT_BROKER})
1429

    
   
1431

   
1430
# This is only really needed until all the trunk builds (Linux, UNIX, Windows)
1432
# This is only really needed until all the trunk builds (Linux, UNIX, Windows)
1431
# are all on cmake only. This is because cmake builds always have a config.h
1433
# are all on cmake only. This is because cmake builds always have a config.h
1432
# file whereas older builds only have config.h on autoconf-generated builds.
1434
# file whereas older builds only have config.h on autoconf-generated builds.
1433
add_definitions(-DHAVE_CONFIG_H)
1435
add_definitions(-DHAVE_CONFIG_H)
1434

    
   
1436

   
1435
add_definitions(-DBOOST_FILESYSTEM_VERSION=2)
1437
add_definitions(-DBOOST_FILESYSTEM_VERSION=2)
1436

    
   
1438

   
1437
# Now create the config file from all the info learned above.
1439
# Now create the config file from all the info learned above.
1438
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
1440
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
1439
               ${CMAKE_CURRENT_BINARY_DIR}/config.h)
1441
               ${CMAKE_CURRENT_BINARY_DIR}/config.h)
1440
add_subdirectory(qpid/store)
1442
add_subdirectory(qpid/store)
1441
add_subdirectory(tests)
1443
add_subdirectory(tests)
1442

    
   
1444

   
1443
# Support for pkg-config
1445
# Support for pkg-config
1444
if (UNIX)
1446
if (UNIX)
1445
  add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
1447
  add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
1446
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qpid.pc.in
1448
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qpid.pc.in
1447
                 ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
1449
                 ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
1448
  install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc
1450
  install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc
1449
           DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
1451
           DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
1450
           COMPONENT ${QPID_COMPONENT_COMMON})
1452
           COMPONENT ${QPID_COMPONENT_COMMON})
1451

    
   
1453

   
1452
  add_dependencies(pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
1454
  add_dependencies(pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
1453
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmf2.pc.in
1455
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmf2.pc.in
1454
                 ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
1456
                 ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
1455
  install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc
1457
  install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc
1456
           DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
1458
           DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
1457
           COMPONENT ${QPID_COMPONENT_COMMON})
1459
           COMPONENT ${QPID_COMPONENT_COMMON})
1458
endif (UNIX)
1460
endif (UNIX)
1459

    
   
1461

   
trunk/qpid/cpp/src/acl.mk
Revision 1330296 New Change
 
trunk/qpid/cpp/src/qpid/acl/Acl.h
Revision 1330296 New Change
 
trunk/qpid/cpp/src/qpid/acl/Acl.cpp
Revision 1330296 New Change
 
trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.h
New File
 
trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp
New File
 
trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp
Revision 1330296 New Change
 
  1. trunk/qpid/cpp/src/CMakeLists.txt: Loading...
  2. trunk/qpid/cpp/src/acl.mk: Loading...
  3. trunk/qpid/cpp/src/qpid/acl/Acl.h: Loading...
  4. trunk/qpid/cpp/src/qpid/acl/Acl.cpp: Loading...
  5. trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.h: Loading...
  6. trunk/qpid/cpp/src/qpid/acl/AclConnectionCounter.cpp: Loading...
  7. trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp: Loading...