You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2012/07/31 01:04:18 UTC
svn commit: r1367355 - in /qpid/proton/trunk/proton-c: CMakeLists.txt
bindings/CMakeLists.txt bindings/python/CMakeLists.txt
bindings/ruby/CMakeLists.txt docs/api/CMakeLists.txt
Author: rhs
Date: Mon Jul 30 23:04:17 2012
New Revision: 1367355
URL: http://svn.apache.org/viewvc?rev=1367355&view=rev
Log:
updated build to install python and ruby bindings
Modified:
qpid/proton/trunk/proton-c/CMakeLists.txt
qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt
qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt
qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt
Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1367355&r1=1367354&r2=1367355&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Mon Jul 30 23:04:17 2012
@@ -56,7 +56,7 @@ add_library (
src/messenger.c
)
-include(FindSWIG)
+find_package(SWIG)
if (SWIG_FOUND)
add_subdirectory(bindings)
endif (SWIG_FOUND)
Modified: qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/CMakeLists.txt?rev=1367355&r1=1367354&r2=1367355&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/CMakeLists.txt Mon Jul 30 23:04:17 2012
@@ -28,7 +28,7 @@ if (PYTHONLIBS_FOUND)
endif (PYTHONLIBS_FOUND)
# Build wrapper for Ruby:
-include(FindRuby)
+find_package(Ruby)
if (RUBY_FOUND)
add_subdirectory(ruby)
endif (RUBY_FOUND)
Modified: qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt?rev=1367355&r1=1367354&r2=1367355&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt Mon Jul 30 23:04:17 2012
@@ -3,3 +3,24 @@ set(CMAKE_SWIG_FLAGS "-threads")
swig_add_module(cproton python python.i)
include_directories (${PYTHON_INCLUDE_PATH})
swig_link_libraries(cproton ${BINDING_DEPS} ${PYTHON_LIBRARIES})
+
+find_package(PythonInterp REQUIRED)
+
+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)
+
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cproton.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile cproton.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.py
+ ${CMAKE_CURRENT_BINARY_DIR}/cproton.pyc
+ ${CMAKE_CURRENT_BINARY_DIR}/cproton.pyo
+ DESTINATION ${PYTHON_SITEARCH_PACKAGES}
+ COMPONENT Python)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cproton.so
+ RENAME _cproton.so
+ DESTINATION ${PYTHON_SITEARCH_PACKAGES}
+ COMPONENT Python)
Modified: qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt?rev=1367355&r1=1367354&r2=1367355&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt Mon Jul 30 23:04:17 2012
@@ -24,3 +24,14 @@ set_target_properties(cproton-ruby PROPE
add_custom_command(TARGET cproton-ruby
POST_BUILD
COMMAND cmake -E rename cproton-ruby.so cproton.so)
+
+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})
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.so
+ RENAME cproton.so
+ DESTINATION ${RUBY_PFX_ARCH_DIR}
+ COMPONENT Ruby)
Modified: qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt?rev=1367355&r1=1367354&r2=1367355&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt Mon Jul 30 23:04:17 2012
@@ -17,19 +17,20 @@
# under the License.
#
-include(FindDoxygen)
+find_package(Doxygen)
if (DOXYGEN_FOUND)
- configure_file (${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in
- ${CMAKE_CURRENT_BINARY_DIR}/user.doxygen)
- add_custom_target (docs-user-api COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen)
+ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in
+ ${CMAKE_CURRENT_BINARY_DIR}/user.doxygen)
+ add_custom_target (docs COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen)
- # HTML files are generated to ./html - put those in the install.
- install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
- DESTINATION docs/api
- COMPONENT documentation)
- # if (CPACK_GENERATOR STREQUAL "NSIS")
- # set (CPACK_NSIS_MENU_LINKS
- # "${QPID_INSTALL_HTMLDIR}/index.html" "Qpid C++ API Documentation"
- # "https://issues.apache.org/jira/browse/QPID" "Report Qpid Problem")
- # endif (CPACK_GENERATOR STREQUAL "NSIS")
+ # HTML files are generated to ./html - put those in the install.
+ install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
+ DESTINATION docs/api
+ COMPONENT documentation
+ OPTIONAL)
+ # if (CPACK_GENERATOR STREQUAL "NSIS")
+ # set (CPACK_NSIS_MENU_LINKS
+ # "${QPID_INSTALL_HTMLDIR}/index.html" "Qpid C++ API Documentation"
+ # "https://issues.apache.org/jira/browse/QPID" "Report Qpid Problem")
+ # endif (CPACK_GENERATOR STREQUAL "NSIS")
endif (DOXYGEN_FOUND)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org