]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: depend on the right version of python bindings
authorKefu Chai <kchai@redhat.com>
Thu, 8 Feb 2018 15:26:22 +0000 (23:26 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 11 Feb 2018 06:12:16 +0000 (14:12 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt

index 9651c75041f81dff2040522b2ef0236e869742f2..aec0681ced3ed568c736fdfc0ef7bba072cd71b5 100644 (file)
@@ -274,6 +274,14 @@ if(WITH_PYTHON3)
   find_package(Python3Libs 3 REQUIRED)
 endif()
 
+# the major version of the python bindings as a dependency of other
+# targets
+if(WITH_PYTHON2)
+  set(PY_BINDING_INFIX "")
+else()
+  set(PY_BINDING_INFIX 3)
+endif()
+
 if(HAVE_XIO)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${XIO_INCLUDE_DIR}")
   list(APPEND EXTRALIBS ${XIO_LIBRARY} pthread)
@@ -1089,13 +1097,12 @@ add_custom_target(vstart-base DEPENDS
     monmaptool
     crushtool
     rados
-    cython_rados
-    )
+    cython${PY_BINDING_INFIX}_rados)
 
 add_custom_target(vstart DEPENDS
     vstart-base
     ceph-mds
-    cython_rbd)
+    cython${PY_BINDING_INFIX}_rbd)
 if(WITH_RADOSGW)
   add_dependencies(vstart radosgw radosgw-admin)
 endif(WITH_RADOSGW)
@@ -1108,7 +1115,7 @@ endif(WITH_LTTNG)
 add_custom_target(cephfs_testing DEPENDS
     vstart
     rados
-    cython_modules
+    cython${PY_BINDING_INFIX}_modules
     cephfs
     cls_cephfs
     ceph-fuse