Author: astitcher
Date: Mon Oct 22 06:56:56 2012
New Revision: 1400781

URL: http://svn.apache.org/viewvc?rev=1400781&view=rev
Log:
QPID-3633: Make cmake the primary build tool for the cpp tree
Get Swigged bindings to install in the correct place

Added:
    qpid/trunk/qpid/cpp/bindings/CMakeLists.txt
Removed:
    qpid/trunk/qpid/cpp/bindings/qmf/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qmf2/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qpid/CMakeLists.txt
Modified:
    qpid/trunk/qpid/cpp/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qmf/python/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qmf2/python/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qpid/perl/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qpid/python/CMakeLists.txt
    qpid/trunk/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/CMakeLists.txt Mon Oct 22 06:56:56 2012
@@ -81,9 +81,7 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "qpi
 add_subdirectory(managementgen)
 add_subdirectory(src)
 add_subdirectory(etc)
-add_subdirectory(bindings/qpid)
-add_subdirectory(bindings/qmf)
-add_subdirectory(bindings/qmf2)
+add_subdirectory(bindings)
 add_subdirectory(docs/api)
 add_subdirectory(docs/man)
 add_subdirectory(examples)

Added: qpid/trunk/qpid/cpp/bindings/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/CMakeLists.txt?rev=1400781&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/CMakeLists.txt (added)
+++ qpid/trunk/qpid/cpp/bindings/CMakeLists.txt Mon Oct 22 06:56:56 2012
@@ -0,0 +1,61 @@
+#
+# 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 "-w361,362,401,467,503")
+
+    if (PYTHONLIBS_FOUND)
+        execute_process(COMMAND ${PYTHON_EXECUTABLE}
+                        -c "from distutils.sysconfig import get_python_lib; 
print get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')"
+                        OUTPUT_VARIABLE PYTHON_SITEARCH_PACKAGES
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+        add_subdirectory(qpid/python)
+        add_subdirectory(qmf2/python)
+        add_subdirectory(qmf/python)
+    endif (PYTHONLIBS_FOUND)
+
+    if (RUBY_FOUND)
+        execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts 
RbConfig::CONFIG['prefix']"
+                        OUTPUT_VARIABLE RUBY_PREFIX
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        string(REPLACE ${RUBY_PREFIX} ${CMAKE_INSTALL_PREFIX} 
RUBY_PFX_ARCH_DIR ${RUBY_ARCH_DIR})
+
+        add_subdirectory(qpid/ruby)
+        add_subdirectory(qmf2/ruby)
+        add_subdirectory(qmf/ruby)
+    endif (RUBY_FOUND)
+
+    if (PERLLIBS_FOUND)
+        execute_process(COMMAND ${PERL_EXECUTABLE} "-V::prefix:"
+                        OUTPUT_VARIABLE QPERL_PREFIX
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        string(REGEX REPLACE "'(.*)'" "\\1" PERL_PREFIX ${QPERL_PREFIX})
+        string(REPLACE ${PERL_PREFIX} ${CMAKE_INSTALL_PREFIX} PERL_PFX_ARCHLIB 
${PERL_ARCHLIB})
+
+        add_subdirectory(qpid/perl)
+    endif (PERLLIBS_FOUND)
+endif (SWIG_FOUND)

Modified: qpid/trunk/qpid/cpp/bindings/qmf/python/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/python/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/python/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/python/CMakeLists.txt Mon Oct 22 06:56:56 
2012
@@ -47,12 +47,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR
               ${CMAKE_CURRENT_SOURCE_DIR}/qmf.py
               ${CMAKE_CURRENT_BINARY_DIR}/qmf.pyc
               ${CMAKE_CURRENT_BINARY_DIR}/qmf.pyo
-        DESTINATION ${PYTHON_SITE_PACKAGES}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_qmfengine_python.so
         RENAME _qmfengine.so
-        DESTINATION ${PYTHON_SITE_PACKAGES}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 

Modified: qpid/trunk/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt Mon Oct 22 06:56:56 
2012
@@ -32,6 +32,6 @@ swig_link_libraries(qmfengine_ruby qmf q
 ##----------------------------------
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libqmfengine_ruby.so
         RENAME qmfengine.so
-        DESTINATION ${RUBY_ARCH_DIR}
+        DESTINATION ${RUBY_PFX_ARCH_DIR}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )

Modified: qpid/trunk/qpid/cpp/bindings/qmf2/python/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf2/python/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf2/python/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf2/python/CMakeLists.txt Mon Oct 22 06:56:56 
2012
@@ -47,12 +47,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR
               ${CMAKE_CURRENT_BINARY_DIR}/qmf2.py
               ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pyc
               ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pyo
-        DESTINATION ${PYTHON_SITE_PACKAGES}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cqmf2_python.so
         RENAME _cqmf2.so
-        DESTINATION ${PYTHON_SITE_PACKAGES}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 

Modified: qpid/trunk/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt Mon Oct 22 06:56:56 
2012
@@ -32,7 +32,7 @@ swig_link_libraries(cqmf2_ruby qmf2 ${RU
 ##----------------------------------
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqmf2_ruby.so
         RENAME cqmf2.so
-        DESTINATION ${RUBY_ARCH_DIR}
+        DESTINATION ${RUBY_PFX_ARCH_DIR}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 

Modified: qpid/trunk/qpid/cpp/bindings/qpid/perl/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/perl/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/perl/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/perl/CMakeLists.txt Mon Oct 22 06:56:56 
2012
@@ -33,6 +33,6 @@ set_source_files_properties(${swig_gener
 ##----------------------------------
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid_perl.so
               ${CMAKE_CURRENT_BINARY_DIR}/cqpid_perl.pm
-        DESTINATION ${PERL_ARCHLIB}
+        DESTINATION ${PERL_PFX_ARCHLIB}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )

Modified: qpid/trunk/qpid/cpp/bindings/qpid/python/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/python/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/python/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/python/CMakeLists.txt Mon Oct 22 06:56:56 
2012
@@ -31,7 +31,6 @@ set_source_files_properties(${swig_gener
 ##------------------------------------
 ## 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 
cqpid.py
                               WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
 install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile 
cqpid.py
@@ -39,12 +38,12 @@ install(CODE "execute_process(COMMAND ${
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cqpid.py
               ${CMAKE_CURRENT_BINARY_DIR}/cqpid.pyc
               ${CMAKE_CURRENT_BINARY_DIR}/cqpid.pyo
-        DESTINATION ${PYTHON_SITE_PACKAGES}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cqpid_python.so
         RENAME _cqpid.so
-        DESTINATION ${PYTHON_SITE_PACKAGES}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 

Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt?rev=1400781&r1=1400780&r2=1400781&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt Mon Oct 22 06:56:56 
2012
@@ -43,7 +43,7 @@ set_source_files_properties(${swig_gener
 ##----------------------------------
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid_ruby.so
         RENAME cqpid.so
-        DESTINATION ${RUBY_ARCH_DIR}
+        DESTINATION ${RUBY_PFX_ARCH_DIR}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to