summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2011-11-03 14:32:01 +0000
committerAndrew Stitcher <astitcher@apache.org>2011-11-03 14:32:01 +0000
commit063f1124a86299ac774b11cbcfe455fbe9ec0d55 (patch)
tree5e122f976359ed492f84b2b87369633595bcd797
parent85b266fe8875fd8750f0f7808f2ad840ad249821 (diff)
downloadqpid-python-063f1124a86299ac774b11cbcfe455fbe9ec0d55.tar.gz
QPID-3464: Build Improvements (CMake) [from Jan-Marek Glogowski]
- Improved CMake build significantly bringing it closer in parity to autotools build git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1197146 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/BuildInstallSettings.cmake8
-rw-r--r--qpid/cpp/CMakeLists.txt6
-rw-r--r--qpid/cpp/bindings/qmf/CMakeLists.txt37
-rw-r--r--qpid/cpp/bindings/qmf/python/CMakeLists.txt58
-rw-r--r--qpid/cpp/bindings/qmf/ruby/CMakeLists.txt38
-rw-r--r--qpid/cpp/bindings/qmf2/CMakeLists.txt37
-rw-r--r--qpid/cpp/bindings/qmf2/python/CMakeLists.txt58
-rw-r--r--qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt39
-rw-r--r--qpid/cpp/bindings/qpid/perl/CMakeLists.txt2
-rw-r--r--qpid/cpp/bindings/qpid/python/CMakeLists.txt11
-rw-r--r--qpid/cpp/bindings/qpid/ruby/CMakeLists.txt8
-rw-r--r--qpid/cpp/docs/man/CMakeLists.txt22
-rw-r--r--qpid/cpp/etc/CMakeLists.txt14
-rw-r--r--qpid/cpp/src/CMakeLists.txt122
-rw-r--r--qpid/cpp/src/cluster.cmake11
-rw-r--r--qpid/cpp/src/rdma.cmake2
-rw-r--r--qpid/cpp/src/ssl.cmake25
-rw-r--r--qpid/cpp/src/versions.cmake38
18 files changed, 463 insertions, 73 deletions
diff --git a/qpid/cpp/BuildInstallSettings.cmake b/qpid/cpp/BuildInstallSettings.cmake
index b3ca26b6ad..3da1d89bfe 100644
--- a/qpid/cpp/BuildInstallSettings.cmake
+++ b/qpid/cpp/BuildInstallSettings.cmake
@@ -88,6 +88,8 @@ if (WIN32)
"Directory to install user executables")
set (QPID_INSTALL_CONFDIR conf CACHE STRING
"Directory to install configuration files")
+ set (QPID_INSTALL_SASLDIR conf CACHE STRING
+ "Directory to install SASL configuration files")
set (QPID_INSTALL_DATADIR conf CACHE STRING
"Directory to install read-only arch.-independent data root")
set (QPID_INSTALL_EXAMPLESDIR examples CACHE STRING
@@ -124,6 +126,8 @@ if (UNIX)
"Directory to install configuration files")
set (QPID_INSTALL_DATADIR share/qpid CACHE STRING
"Directory to install read-only arch.-independent data root")
+ set (QPID_INSTALL_SASLDIR etc/sasl2 CACHE STRING
+ "Directory to install SASL configuration files")
set (QPID_INSTALL_EXAMPLESDIR share/examples CACHE STRING
"Directory to install programming examples in")
set (QPID_INSTALL_HTMLDIR html CACHE STRING
@@ -140,4 +144,8 @@ if (UNIX)
"Directory to load broker plug-in modules from")
set (QPID_LIBEXEC_DIR libexec/qpid CACHE STRING
"Directory for executables used by qpid libs")
+ set (QPID_LOCALSTATE_DIR var CACHE STRING
+ "Directory to store local state data")
+ set (QPID_MAN_DIR man CACHE STRING
+ "Directory to install manual files")
endif (UNIX)
diff --git a/qpid/cpp/CMakeLists.txt b/qpid/cpp/CMakeLists.txt
index 17411e90a4..4c83540909 100644
--- a/qpid/cpp/CMakeLists.txt
+++ b/qpid/cpp/CMakeLists.txt
@@ -78,11 +78,13 @@ set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "qpidc-${qpidc_version}")
add_subdirectory(managementgen)
-add_subdirectory(etc)
add_subdirectory(src)
+add_subdirectory(etc)
add_subdirectory(bindings/qpid)
+add_subdirectory(bindings/qmf)
+add_subdirectory(bindings/qmf2)
add_subdirectory(docs/api)
-# add_subdirectory(docs/man)
+add_subdirectory(docs/man)
add_subdirectory(examples)
include (CPack)
diff --git a/qpid/cpp/bindings/qmf/CMakeLists.txt b/qpid/cpp/bindings/qmf/CMakeLists.txt
new file mode 100644
index 0000000000..5e40539e80
--- /dev/null
+++ b/qpid/cpp/bindings/qmf/CMakeLists.txt
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+
+include(FindSWIG)
+include(UseSWIG)
+include(FindRuby)
+include(FindPythonLibs)
+include(FindPerlLibs)
+
+if (SWIG_FOUND)
+ set(CMAKE_SWIG_FLAGS "-w362,401")
+
+ if (PYTHONLIBS_FOUND)
+ add_subdirectory(python)
+ endif (PYTHONLIBS_FOUND)
+
+ if (RUBY_FOUND)
+ add_subdirectory(ruby)
+ endif (RUBY_FOUND)
+endif (SWIG_FOUND)
diff --git a/qpid/cpp/bindings/qmf/python/CMakeLists.txt b/qpid/cpp/bindings/qmf/python/CMakeLists.txt
new file mode 100644
index 0000000000..9bc6b2e878
--- /dev/null
+++ b/qpid/cpp/bindings/qmf/python/CMakeLists.txt
@@ -0,0 +1,58 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+##------------------------------------------------------
+## Use Swig to generate a literal binding to the C++ API
+##------------------------------------------------------
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
+
+swig_add_module(qmfengine_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i)
+swig_link_libraries(qmfengine_python qmf qmfconsole ${PYTHON_LIBRARIES})
+
+set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PYTHON_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include")
+
+##------------------------------------
+## Install the complete Python binding
+##------------------------------------
+execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qmfengine.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qmfengine.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/qmf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qmf.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qmf.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmfengine.py
+ ${CMAKE_CURRENT_BINARY_DIR}/qmfengine.pyc
+ ${CMAKE_CURRENT_BINARY_DIR}/qmfengine.pyo
+ ${CMAKE_CURRENT_SOURCE_DIR}/qmf.py
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf.pyc
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf.pyo
+ DESTINATION ${PYTHON_SITE_PACKAGES}
+ COMPONENT ${QPID_COMPONENT_CLIENT}
+ )
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_qmfengine_python.so
+ RENAME _qmfengine.so
+ DESTINATION ${PYTHON_SITE_PACKAGES}
+ COMPONENT ${QPID_COMPONENT_CLIENT}
+ )
+
diff --git a/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt b/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt
new file mode 100644
index 0000000000..4b6ba2c1c3
--- /dev/null
+++ b/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+##------------------------------------------------------
+## Use Swig to generate a literal binding to the C++ API
+##------------------------------------------------------
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
+
+swig_add_module(qmfengine_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
+swig_link_libraries(qmfengine_ruby qmf qmfconsole ${RUBY_LIBRARY})
+
+set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
+
+##----------------------------------
+## Install the complete Ruby binding
+##----------------------------------
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libqmfengine_ruby.so
+ RENAME qmfengine.so
+ DESTINATION ${RUBY_ARCH_DIR}
+ COMPONENT ${QPID_COMPONENT_CLIENT}
+ )
diff --git a/qpid/cpp/bindings/qmf2/CMakeLists.txt b/qpid/cpp/bindings/qmf2/CMakeLists.txt
new file mode 100644
index 0000000000..5e40539e80
--- /dev/null
+++ b/qpid/cpp/bindings/qmf2/CMakeLists.txt
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+
+include(FindSWIG)
+include(UseSWIG)
+include(FindRuby)
+include(FindPythonLibs)
+include(FindPerlLibs)
+
+if (SWIG_FOUND)
+ set(CMAKE_SWIG_FLAGS "-w362,401")
+
+ if (PYTHONLIBS_FOUND)
+ add_subdirectory(python)
+ endif (PYTHONLIBS_FOUND)
+
+ if (RUBY_FOUND)
+ add_subdirectory(ruby)
+ endif (RUBY_FOUND)
+endif (SWIG_FOUND)
diff --git a/qpid/cpp/bindings/qmf2/python/CMakeLists.txt b/qpid/cpp/bindings/qmf2/python/CMakeLists.txt
new file mode 100644
index 0000000000..2e71ca34e7
--- /dev/null
+++ b/qpid/cpp/bindings/qmf2/python/CMakeLists.txt
@@ -0,0 +1,58 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+##------------------------------------------------------
+## Use Swig to generate a literal binding to the C++ API
+##------------------------------------------------------
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
+
+swig_add_module(cqmf2_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i)
+swig_link_libraries(cqmf2_python qmf2 ${PYTHON_LIBRARIES})
+
+set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PYTHON_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include")
+
+##------------------------------------
+## Install the complete Python binding
+##------------------------------------
+execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cqmf2.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile cqmf2.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/qmf2.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qmf2.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qmf2.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cqmf2.py
+ ${CMAKE_CURRENT_BINARY_DIR}/cqmf2.pyc
+ ${CMAKE_CURRENT_BINARY_DIR}/cqmf2.pyo
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf2.py
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pyc
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pyo
+ DESTINATION ${PYTHON_SITE_PACKAGES}
+ COMPONENT ${QPID_COMPONENT_CLIENT}
+ )
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cqmf2_python.so
+ RENAME _cqmf2.so
+ DESTINATION ${PYTHON_SITE_PACKAGES}
+ COMPONENT ${QPID_COMPONENT_CLIENT}
+ )
+
diff --git a/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt b/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt
new file mode 100644
index 0000000000..3bc97cf35f
--- /dev/null
+++ b/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+##------------------------------------------------------
+## Use Swig to generate a literal binding to the C++ API
+##------------------------------------------------------
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
+
+swig_add_module(cqmf2_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
+swig_link_libraries(cqmf2_ruby qmf2 ${RUBY_LIBRARY})
+
+set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
+
+##----------------------------------
+## Install the complete Ruby binding
+##----------------------------------
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqmf2_ruby.so
+ RENAME cqmf2.so
+ DESTINATION ${RUBY_ARCH_DIR}
+ COMPONENT ${QPID_COMPONENT_CLIENT}
+ )
+
diff --git a/qpid/cpp/bindings/qpid/perl/CMakeLists.txt b/qpid/cpp/bindings/qpid/perl/CMakeLists.txt
index 6edaf284b1..0d66c144db 100644
--- a/qpid/cpp/bindings/qpid/perl/CMakeLists.txt
+++ b/qpid/cpp/bindings/qpid/perl/CMakeLists.txt
@@ -33,6 +33,6 @@ set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_F
##----------------------------------
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid_perl.so
${CMAKE_CURRENT_BINARY_DIR}/cqpid_perl.pm
- DESTINATION ${PERL_VENDORARCH}
+ DESTINATION ${PERL_ARCHLIB}
COMPONENT ${QPID_COMPONENT_CLIENT}
)
diff --git a/qpid/cpp/bindings/qpid/python/CMakeLists.txt b/qpid/cpp/bindings/qpid/python/CMakeLists.txt
index 5e4649cd7c..9cb40162a5 100644
--- a/qpid/cpp/bindings/qpid/python/CMakeLists.txt
+++ b/qpid/cpp/bindings/qpid/python/CMakeLists.txt
@@ -23,8 +23,8 @@
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
-swig_add_module(cqpid python ${CMAKE_CURRENT_SOURCE_DIR}/python.i)
-swig_link_libraries(cqpid qpidmessaging qpidtypes qmf2 ${PYTHON_LIBRARIES})
+swig_add_module(cqpid_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i)
+swig_link_libraries(cqpid_python qpidmessaging qpidtypes qmf2 ${PYTHON_LIBRARIES})
set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PYTHON_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include")
@@ -39,7 +39,12 @@ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile cqpi
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cqpid.py
${CMAKE_CURRENT_BINARY_DIR}/cqpid.pyc
${CMAKE_CURRENT_BINARY_DIR}/cqpid.pyo
- ${CMAKE_CURRENT_BINARY_DIR}/_cqpid.so
DESTINATION ${PYTHON_SITE_PACKAGES}
COMPONENT ${QPID_COMPONENT_CLIENT}
)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cqpid_python.so
+ RENAME _cqpid.so
+ DESTINATION ${PYTHON_SITE_PACKAGES}
+ COMPONENT ${QPID_COMPONENT_CLIENT}
+ )
+
diff --git a/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
index 25258cfc6a..8a8c88b595 100644
--- a/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
+++ b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
@@ -32,17 +32,17 @@ set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/pkg/qpid-${qpidc_version}.0.gem)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
-swig_add_module(cqpid ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
-swig_link_libraries(cqpid qpidmessaging qpidtypes qmf2 ${RUBY_LIBRARY})
+swig_add_module(cqpid_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
+swig_link_libraries(cqpid_ruby qpidmessaging qpidtypes qmf2 ${RUBY_LIBRARY})
set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
##----------------------------------
## Install the complete Ruby binding
##----------------------------------
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid.so
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid_ruby.so
RENAME cqpid.so
- DESTINATION ${RUBY_SITEARCH_DIR}
+ DESTINATION ${RUBY_ARCH_DIR}
COMPONENT ${QPID_COMPONENT_CLIENT}
)
diff --git a/qpid/cpp/docs/man/CMakeLists.txt b/qpid/cpp/docs/man/CMakeLists.txt
new file mode 100644
index 0000000000..3c006900c9
--- /dev/null
+++ b/qpid/cpp/docs/man/CMakeLists.txt
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+INSTALL (FILES qpidd.1
+ DESTINATION ${QPID_MAN_DIR}/man1)
+
diff --git a/qpid/cpp/etc/CMakeLists.txt b/qpid/cpp/etc/CMakeLists.txt
index 03121b364a..014842c9c7 100644
--- a/qpid/cpp/etc/CMakeLists.txt
+++ b/qpid/cpp/etc/CMakeLists.txt
@@ -17,4 +17,16 @@
# under the License.
#
-install(FILES qpidd.conf qpidc.conf DESTINATION ${QPID_INSTALL_CONFDIR})
+install(FILES qpidc.conf
+ DESTINATION ${QPID_INSTALL_CONFDIR}
+ COMPONENT ${QPID_COMPONENT_CLIENT})
+install(FILES qpidd.conf
+ DESTINATION ${QPID_INSTALL_CONFDIR}
+ COMPONENT ${QPID_COMPONENT_BROKER})
+if (BUILD_SASL)
+ install(FILES sasl2/qpidd.conf
+ DESTINATION ${QPID_INSTALL_SASLDIR}
+ COMPONENT ${QPID_COMPONENT_BROKER}
+ RENAME ${BROKER_SASL_NAME}.conf)
+endif (BUILD_SASL)
+
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt
index 02db779e1b..2736500b45 100644
--- a/qpid/cpp/src/CMakeLists.txt
+++ b/qpid/cpp/src/CMakeLists.txt
@@ -17,6 +17,9 @@
# under the License.
#
+# library versions
+include (versions.cmake)
+
# Option to require building optional plugins
foreach (r ${REQUIRE})
set(${r}_force ON)
@@ -256,7 +259,6 @@ if (ENABLE_VALGRIND AND NOT VALGRIND)
endif (ENABLE_VALGRIND AND NOT VALGRIND)
if (CMAKE_COMPILER_IS_GNUCXX)
- set (COMPILER_FLAGS "")
# Warnings: Enable as many as possible, keep the code clean. Please
# do not disable warnings or remove -Werror without discussing on
# qpid-dev list.
@@ -465,7 +467,6 @@ IF (NOT HAVE_UUID AND NOT HAVE_UUID_H)
message(FATAL_ERROR "Uuid library and/or header file not found")
ENDIF (NOT HAVE_UUID AND NOT HAVE_UUID_H)
-
# See if Cyrus SASL is desired and available
CHECK_LIBRARY_EXISTS (sasl2 sasl_checkpass "" HAVE_SASL)
CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_H)
@@ -484,6 +485,7 @@ if (BUILD_SASL)
message(FATAL_ERROR "Cyrus SASL support requested but sasl.h not found")
endif (NOT HAVE_SASL_H)
+ find_program(SASLPASSWD2 saslpasswd2 DOC "Location of the saslpasswd2 program")
set(BROKER_SASL_NAME "qpidd" CACHE STRING "SASL app name for the qpid broker")
set(qpidcommon_sasl_source
qpid/sys/cyrus/CyrusSecurityLayer.h
@@ -691,7 +693,10 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows)
qpid/sys/posix/SystemInfo.cpp
)
add_definitions(-pthread)
- set (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} -pthread)
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
+ if (CMAKE_COMPILER_IS_GNUCXX)
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -pthread")
+ endif (CMAKE_COMPILER_IS_GNUCXX)
endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
if (CMAKE_SYSTEM_NAME STREQUAL SunOS)
@@ -704,6 +709,7 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows)
set (qpidtypes_platform_SOURCES)
set (qpidtypes_platform_LIBS
uuid
+ ${Boost_SYSTEM_LIBRARY}
)
set (qpidcommon_platform_SOURCES
@@ -824,7 +830,7 @@ target_link_libraries (qpidcommon qpidtypes
${qpidcommon_platform_LIBS}
${qpidcommon_sasl_lib})
set_target_properties (qpidcommon PROPERTIES
- VERSION ${qpidc_version})
+ VERSION ${qpidcommon_version})
install (TARGETS qpidcommon
DESTINATION ${QPID_INSTALL_LIBDIR}
COMPONENT ${QPID_COMPONENT_COMMON})
@@ -839,7 +845,7 @@ set(qpidtypes_SOURCES
add_msvc_version (qpidtypes library dll)
add_library(qpidtypes SHARED ${qpidtypes_SOURCES})
target_link_libraries(qpidtypes ${qpidtypes_platform_LIBS})
-set_target_properties (qpidtypes PROPERTIES VERSION ${qpidc_version})
+set_target_properties (qpidtypes PROPERTIES VERSION ${qpidtypes_version})
install(TARGETS qpidtypes
DESTINATION ${QPID_INSTALL_LIBDIR}
COMPONENT ${QPID_COMPONENT_COMMON})
@@ -886,7 +892,7 @@ add_msvc_version (qpidclient library dll)
add_library (qpidclient SHARED ${qpidclient_SOURCES})
target_link_libraries (qpidclient qpidcommon ${qpidclient_platform_LIBS})
-set_target_properties (qpidclient PROPERTIES VERSION ${qpidc_version})
+set_target_properties (qpidclient PROPERTIES VERSION ${qpidclient_version})
install (TARGETS qpidclient
DESTINATION ${QPID_INSTALL_LIBDIR}
COMPONENT ${QPID_COMPONENT_CLIENT})
@@ -939,7 +945,7 @@ add_msvc_version (qpidmessaging library dll)
add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES})
target_link_libraries (qpidmessaging qpidclient)
-set_target_properties (qpidmessaging PROPERTIES VERSION ${qpidc_version})
+set_target_properties (qpidmessaging PROPERTIES VERSION ${qpidmessaging_version})
install (TARGETS qpidmessaging
DESTINATION ${QPID_INSTALL_LIBDIR}
COMPONENT ${QPID_COMPONENT_CLIENT})
@@ -1048,7 +1054,7 @@ set (qpidbroker_SOURCES
add_msvc_version (qpidbroker library dll)
add_library (qpidbroker SHARED ${qpidbroker_SOURCES})
target_link_libraries (qpidbroker qpidcommon ${qpidbroker_platform_LIBS})
-set_target_properties (qpidbroker PROPERTIES VERSION ${qpidc_version})
+set_target_properties (qpidbroker PROPERTIES VERSION ${qpidbroker_version})
if (MSVC)
set_target_properties (qpidbroker PROPERTIES COMPILE_FLAGS /wd4290)
endif (MSVC)
@@ -1068,37 +1074,38 @@ add_executable (qpidd ${qpidd_SOURCES})
target_link_libraries (qpidd qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_FILESYSTEM_LIBRARY})
install (TARGETS qpidd RUNTIME
- DESTINATION ${QPID_INSTALL_BINDIR}
+ DESTINATION ${QPID_INSTALL_SBINDIR}
COMPONENT ${QPID_COMPONENT_BROKER})
if (CPACK_GENERATOR STREQUAL "NSIS")
set (CPACK_NSIS_MENU_LINKS
"qpidd" "Start Qpid Broker")
endif (CPACK_GENERATOR STREQUAL "NSIS")
-# QMF library
-# Library Version Information (CURRENT.REVISION.AGE):
-#
-# CURRENT => API/ABI version. Bump this if the interface changes
-# REVISION => Version of underlying implementation.
-# Bump if implementation changes but API/ABI doesn't
-# AGE => Number of API/ABI versions this is backward compatible with
-set (qmf_version 2.0.0)
-set (qmf2_version 1.0.0)
-set (qmfengine_version 1.0.0)
+if (UNIX)
+ install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/lib/qpidd)")
+ install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/spool/qpidd)")
+endif (UNIX)
set (qmf_SOURCES
qpid/agent/ManagementAgentImpl.cpp
qpid/agent/ManagementAgentImpl.h
)
+set (qmf_HEADERS
+ ../include/qpid/agent/ManagementAgent.h
+ ../include/qpid/agent/QmfAgentImportExport.h
+ )
add_msvc_version (qmf library dll)
add_library (qmf SHARED ${qmf_SOURCES})
-target_link_libraries (qmf qpidclient)
+target_link_libraries (qmf qmfengine)
set_target_properties (qmf PROPERTIES
VERSION ${qmf_version})
install (TARGETS qmf OPTIONAL
DESTINATION ${QPID_INSTALL_LIBDIR}
COMPONENT ${QPID_COMPONENT_QMF})
+install (FILES ${qmf_HEADERS}
+ DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/agent
+ COMPONENT ${QPID_COMPONENT_QMF})
install_pdb (qmf ${QPID_COMPONENT_QMF})
if(NOT WIN32)
@@ -1210,6 +1217,26 @@ set (qmfengine_SOURCES
qmf/engine/ValueImpl.cpp
qmf/engine/ValueImpl.h
)
+
+set (qmfengine_HEADERS
+ ../include/qmf/engine/Agent.h
+ ../include/qmf/engine/ConnectionSettings.h
+ ../include/qmf/engine/Console.h
+ ../include/qmf/engine/Event.h
+ ../include/qmf/engine/Message.h
+ ../include/qmf/engine/Object.h
+ ../include/qmf/engine/ObjectId.h
+ ../include/qmf/engine/QmfEngineImportExport.h
+ ../include/qmf/engine/Query.h
+ ../include/qmf/engine/ResilientConnection.h
+ ../include/qmf/engine/Schema.h
+ ../include/qmf/engine/Typecode.h
+ ../include/qmf/engine/Value.h
+ )
+install (FILES ${qmfengine_HEADERS}
+ DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qmf/engine
+ COMPONENT ${QPID_COMPONENT_QMF})
+
if (NOT WIN32)
list(APPEND qmfengine_SOURCES qmf/engine/ResilientConnection.cpp)
endif (NOT WIN32)
@@ -1224,22 +1251,20 @@ install (TARGETS qmfengine OPTIONAL
COMPONENT ${QPID_COMPONENT_QMF})
install_pdb (qmfengine ${QPID_COMPONENT_QMF})
-# QMF console library
-#module_hdr += \
-# qpid/console/Agent.h \
-# qpid/console/Broker.h \
-# qpid/console/ClassKey.h \
-# qpid/console/ConsoleImportExport.h \
-# qpid/console/ConsoleListener.h \
-# qpid/console/Event.h \
-# qpid/console/Object.h \
-# qpid/console/ObjectId.h \
-# qpid/console/Package.h \
-# qpid/console/Schema.h \
-# qpid/console/SequenceManager.h \
-# qpid/console/SessionManager.h \
-# qpid/console/Value.h
set (qmfconsole_SOURCES
+ qpid/console/Agent.cpp
+ qpid/console/Broker.cpp
+ qpid/console/ClassKey.cpp
+ qpid/console/Event.cpp
+ qpid/console/Object.cpp
+ qpid/console/ObjectId.cpp
+ qpid/console/Package.cpp
+ qpid/console/Schema.cpp
+ qpid/console/SequenceManager.cpp
+ qpid/console/SessionManager.cpp
+ qpid/console/Value.cpp
+ )
+set (qmfconsole_HEADERS
../include/qpid/console/Agent.h
../include/qpid/console/Broker.h
../include/qpid/console/ClassKey.h
@@ -1253,26 +1278,18 @@ set (qmfconsole_SOURCES
../include/qpid/console/SequenceManager.h
../include/qpid/console/SessionManager.h
../include/qpid/console/Value.h
- qpid/console/Agent.cpp
- qpid/console/Broker.cpp
- qpid/console/ClassKey.cpp
- qpid/console/Event.cpp
- qpid/console/Object.cpp
- qpid/console/ObjectId.cpp
- qpid/console/Package.cpp
- qpid/console/Schema.cpp
- qpid/console/SequenceManager.cpp
- qpid/console/SessionManager.cpp
- qpid/console/Value.cpp
)
add_msvc_version (qmfconsole library dll)
add_library (qmfconsole SHARED ${qmfconsole_SOURCES})
target_link_libraries (qmfconsole qpidclient)
set_target_properties (qmfconsole PROPERTIES
- VERSION ${qpidc_version})
+ VERSION ${qmfconsole_version})
install (TARGETS qmfconsole
DESTINATION ${QPID_INSTALL_LIBDIR}
COMPONENT ${QPID_COMPONENT_QMF})
+install (FILES ${qmfconsole_HEADERS}
+ DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/console
+ COMPONENT ${QPID_COMPONENT_QMF})
install_pdb (qmfconsole ${QPID_COMPONENT_QMF})
# A queue event listener plugin that creates messages on a replication
@@ -1327,3 +1344,14 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config.h)
add_subdirectory(qpid/store)
add_subdirectory(tests)
+
+# Support for pkg-config
+if (UNIX)
+ add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qpid.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc
+ DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
+ COMPONENT ${QPID_COMPONENT_COMMON})
+endif (UNIX)
+
diff --git a/qpid/cpp/src/cluster.cmake b/qpid/cpp/src/cluster.cmake
index a389f8f13f..d743942fff 100644
--- a/qpid/cpp/src/cluster.cmake
+++ b/qpid/cpp/src/cluster.cmake
@@ -153,15 +153,18 @@ if (BUILD_CLUSTER)
LINK_FLAGS "-Wl,--no-undefined -pthread")
endif (CMAKE_COMPILER_IS_GNUCXX)
- install (TARGETS cluster
- DESTINATION ${QPIDD_MODULE_DIR}
- COMPONENT ${QPID_COMPONENT_BROKER})
-
add_library (watchdog MODULE qpid/cluster/WatchDogPlugin.cpp)
set_target_properties (watchdog PROPERTIES PREFIX "")
add_executable(qpidd_watchdog qpid/cluster/qpidd_watchdog.cpp)
+ install (TARGETS cluster watchdog
+ DESTINATION ${QPIDD_MODULE_DIR}
+ COMPONENT ${QPID_COMPONENT_BROKER})
+ install (TARGETS qpidd_watchdog
+ DESTINATION ${QPID_LIBEXEC_DIR}
+ COMPONENT ${QPID_COMPONENT_BROKER})
+
endif (BUILD_CLUSTER)
# Distribute all sources.
diff --git a/qpid/cpp/src/rdma.cmake b/qpid/cpp/src/rdma.cmake
index e020cb84a9..1d840e5d18 100644
--- a/qpid/cpp/src/rdma.cmake
+++ b/qpid/cpp/src/rdma.cmake
@@ -64,7 +64,7 @@ if (BUILD_RDMA)
add_library (rdmawrap SHARED ${rdma_SOURCES})
target_link_libraries (rdmawrap qpidcommon rdmacm ibverbs)
- set_target_properties (rdmawrap PROPERTIES VERSION ${qpidc_version})
+ set_target_properties (rdmawrap PROPERTIES VERSION ${rdmawrap_version})
if (CMAKE_COMPILER_IS_GNUCXX)
set_target_properties(rdmawrap PROPERTIES
COMPILE_FLAGS -Wno-missing-field-initializers
diff --git a/qpid/cpp/src/ssl.cmake b/qpid/cpp/src/ssl.cmake
index c205845388..6bc1d07d6d 100644
--- a/qpid/cpp/src/ssl.cmake
+++ b/qpid/cpp/src/ssl.cmake
@@ -40,15 +40,15 @@ endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
option(BUILD_SSL "Build with support for SSL" ${ssl_default})
if (BUILD_SSL)
- if (CMAKE_SYSTEM_NAME STREQUAL Windows)
- set (sslclient_windows_SOURCES qpid/client/windows/SslConnector.cpp)
- set (sslbroker_windows_SOURCES qpid/broker/windows/SslProtocolFactory.cpp)
- set (sslcommon_windows_SOURCES
- qpid/sys/windows/SslAsynchIO.cpp
- )
- set (windows_ssl_libs Secur32.lib)
- set (windows_ssl_server_libs Crypt32.lib)
- else (CMAKE_SYSTEM_NAME STREQUAL Windows)
+ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+ set (sslclient_windows_SOURCES qpid/client/windows/SslConnector.cpp)
+ set (sslbroker_windows_SOURCES qpid/broker/windows/SslProtocolFactory.cpp)
+ set (sslcommon_windows_SOURCES
+ qpid/sys/windows/SslAsynchIO.cpp
+ )
+ set (windows_ssl_libs Secur32.lib)
+ set (windows_ssl_server_libs Crypt32.lib)
+ else (CMAKE_SYSTEM_NAME STREQUAL Windows)
if (NOT NSS_FOUND)
message(FATAL_ERROR "nss/nspr not found, required for ssl support")
@@ -76,10 +76,15 @@ if (BUILD_SSL)
add_library (sslcommon SHARED ${sslcommon_SOURCES})
target_link_libraries (sslcommon qpidcommon)
set_target_properties (sslcommon PROPERTIES
- VERSION ${qpidc_version}
+ VERSION ${sslcommon_version}
COMPILE_FLAGS ${NSS_COMPILE_FLAGS}
LINK_FLAGS ${NSS_LINK_FLAGS})
+ install (TARGETS sslcommon
+ DESTINATION ${QPID_INSTALL_LIBDIR}
+ COMPONENT ${QPID_COMPONENT_COMMON})
+ install_pdb (sslcommon ${QPID_COMPONENT_COMMON})
+
set (ssl_SOURCES
qpid/sys/SslPlugin.cpp
qpid/sys/ssl/SslHandler.h
diff --git a/qpid/cpp/src/versions.cmake b/qpid/cpp/src/versions.cmake
new file mode 100644
index 0000000000..d7120c680d
--- /dev/null
+++ b/qpid/cpp/src/versions.cmake
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Library Version Information (CURRENT.REVISION.AGE):
+#
+# CURRENT => API/ABI version. Bump this if the interface changes
+# REVISION => Version of underlying implementation.
+# Bump if implementation changes but API/ABI doesn't
+# AGE => Number of API/ABI versions this is backward compatible with
+
+set (qmf_version 1.0.0)
+set (qmf2_version 1.0.0)
+set (qmfconsole_version 2.0.0)
+set (qmfengine_version 1.1.0)
+set (qpidbroker_version 2.0.0)
+set (qpidclient_version 2.0.0)
+set (qpidcommon_version 2.0.0)
+set (qpidmessaging_version 2.0.0)
+set (qpidtypes_version 1.0.0)
+set (rdmawrap_version 2.0.0)
+set (sslcommon_version 2.0.0)
+