From 9a1d64c93d1457f46e964af65c299dfd340e2604 Mon Sep 17 00:00:00 2001 From: Anirudha Bose Date: Mon, 13 Jun 2016 23:47:09 +0530 Subject: [PATCH] pybind: Add CMake support in rados Signed-off-by: Anirudha Bose --- cmake/modules/Distutils.cmake | 2 ++ src/pybind/Makefile.am | 2 +- src/pybind/rados/setup.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake index 07e6a0ff50a52..313452faf4b11 100644 --- a/cmake/modules/Distutils.cmake +++ b/cmake/modules/Distutils.cmake @@ -46,6 +46,7 @@ function(distutils_add_cython_module name src) OPT=\"-DNDEBUG -g -fwrapv -O2 -Wall\" LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} + CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\" ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base ${CYTHON_MODULE_DIR} --verbose WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -68,6 +69,7 @@ function(distutils_install_cython_module name) execute_process( COMMAND env CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} + CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\" ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base ${CYTHON_MODULE_DIR} --verbose diff --git a/src/pybind/Makefile.am b/src/pybind/Makefile.am index b3ecd7a46b8c1..1832afe4e829d 100644 --- a/src/pybind/Makefile.am +++ b/src/pybind/Makefile.am @@ -13,7 +13,7 @@ PY_DISTUTILS = \ CFLAGS="-iquote \${abs_srcdir}/include ${AM_CFLAGS} ${PYTHON_CFLAGS}" \ LDFLAGS="-L\${abs_builddir}/.libs $(subst -pie,,${AM_LDFLAGS}) ${PYTHON_LDFLAGS}" \ CYTHON_BUILD_DIR=$(CYTHON_BUILD_DIR) \ - CEPH_LIB_DIR="$(abs_builddir)/.libs" \ + CEPH_LIBDIR="$(abs_builddir)/.libs" \ ${PYTHON} ./setup.py if WITH_RADOS diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py index 5eba093cfc9b9..efe574ba37b46 100755 --- a/src/pybind/rados/setup.py +++ b/src/pybind/rados/setup.py @@ -105,7 +105,7 @@ def check_sanity(): ) compiler.add_include_dir(os.path.join(CEPH_SRC_DIR, 'include')) - compiler.add_library_dir(os.environ['CEPH_LIB_DIR']) + compiler.add_library_dir(os.environ.get('CEPH_LIBDIR')) try: compiler.link_executable(