]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: install libs into ${CMAKE_INSTALL_LIBDIR}
authorKefu Chai <kchai@redhat.com>
Thu, 30 Jun 2016 07:39:52 +0000 (15:39 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 30 Jun 2016 11:27:43 +0000 (19:27 +0800)
this address rpm build failures on amd64 platforms:

Directory not found:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/rados-classes
File not found by glob:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/rados-classes/*
File not found by glob:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/libos_tp.so*
File not found by glob:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-11.0.0-119.gcd3ee3c.x86_64/usr/lib64/libosd_tp.so*

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/cls/CMakeLists.txt
src/tracing/CMakeLists.txt

index 1c3f55c4275762f1679c185d414c1755d03f1909..659662726c855329391733ff6493d0278ede2804 100644 (file)
@@ -1,20 +1,22 @@
 ## Rados object classes
 
+set(cls_dir ${CMAKE_INSTALL_LIBDIR}/rados-classes)
+
 # cls_hello
 add_library(cls_hello SHARED hello/cls_hello.cc)
 set_target_properties(cls_hello PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_hello DESTINATION lib/rados-classes)
+install(TARGETS cls_hello DESTINATION ${cls_dir})
 
 # cls_numops
 add_library(cls_numops SHARED numops/cls_numops.cc)
 set_target_properties(cls_numops PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_numops DESTINATION lib/rados-classes)
+install(TARGETS cls_numops DESTINATION ${cls_dir})
 
 # cls_rbd
 if (WITH_RBD)
   add_library(cls_rbd SHARED rbd/cls_rbd.cc rbd/cls_rbd_types.cc)
   set_target_properties(cls_rbd PROPERTIES VERSION "1.0.0" SOVERSION "1")
-  install(TARGETS cls_rbd DESTINATION lib/rados-classes)
+  install(TARGETS cls_rbd DESTINATION ${cls_dir})
 
   add_library(cls_rbd_client STATIC rbd/cls_rbd_client.cc rbd/cls_rbd_types.cc)
 endif (WITH_RBD)
@@ -22,7 +24,7 @@ endif (WITH_RBD)
 # cls_lock
 add_library(cls_lock SHARED lock/cls_lock.cc)
 set_target_properties(cls_lock PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_lock DESTINATION lib/rados-classes)
+install(TARGETS cls_lock DESTINATION ${cls_dir})
 
 add_library(cls_lock_client STATIC
   lock/cls_lock_client.cc
@@ -36,7 +38,7 @@ add_library(cls_refcount SHARED
   ${CMAKE_SOURCE_DIR}/src/common/ceph_json.cc)
 target_link_libraries(cls_refcount json_spirit)
 set_target_properties(cls_refcount PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_refcount DESTINATION lib/rados-classes)
+install(TARGETS cls_refcount DESTINATION ${cls_dir})
 
 add_library(cls_refcount_client STATIC
   refcount/cls_refcount_client.cc
@@ -45,7 +47,7 @@ add_library(cls_refcount_client STATIC
 # cls_version
 add_library(cls_version SHARED version/cls_version.cc)
 set_target_properties(cls_version PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_version DESTINATION lib/rados-classes)
+install(TARGETS cls_version DESTINATION ${cls_dir})
 
 add_library(cls_version_client STATIC
   version/cls_version_client.cc
@@ -54,28 +56,28 @@ add_library(cls_version_client STATIC
 # cls_log
 add_library(cls_log SHARED log/cls_log.cc)
 set_target_properties(cls_log PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_log DESTINATION lib/rados-classes)
+install(TARGETS cls_log DESTINATION ${cls_dir})
 
 add_library(cls_log_client STATIC log/cls_log_client.cc)
 
 # cls_statelog
 add_library(cls_statelog SHARED statelog/cls_statelog.cc)
 set_target_properties(cls_statelog PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_statelog DESTINATION lib/rados-classes)
+install(TARGETS cls_statelog DESTINATION ${cls_dir})
 
 add_library(cls_statelog_client STATIC statelog/cls_statelog_client.cc)
 
 # cls_timeindex
 add_library(cls_timeindex SHARED timeindex/cls_timeindex.cc)
 set_target_properties(cls_timeindex PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_timeindex DESTINATION lib/rados-classes)
+install(TARGETS cls_timeindex DESTINATION ${cls_dir})
 
 add_library(cls_timeindex_client STATIC timeindex/cls_timeindex_client.cc)
 
 # cls_replica_log
 add_library(cls_replica_log SHARED replica_log/cls_replica_log.cc)
 set_target_properties(cls_replica_log PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_replica_log DESTINATION lib/rados-classes)
+install(TARGETS cls_replica_log DESTINATION ${cls_dir})
 
 add_library(cls_replica_log_client STATIC
   replica_log/cls_replica_log_types.cc
@@ -85,7 +87,7 @@ add_library(cls_replica_log_client STATIC
 # cls_user
 add_library(cls_user SHARED user/cls_user.cc)
 set_target_properties(cls_user PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_user DESTINATION lib/rados-classes)
+install(TARGETS cls_user DESTINATION ${cls_dir})
 
 add_library(cls_user_client STATIC
   user/cls_user_client.cc
@@ -97,7 +99,7 @@ add_library(cls_journal SHARED
   journal/cls_journal.cc
   journal/cls_journal_types.cc)
 set_target_properties(cls_journal PROPERTIES VERSION "1.0.0" SOVERSION "1")
-install(TARGETS cls_journal DESTINATION lib/rados-classes)
+install(TARGETS cls_journal DESTINATION ${cls_dir})
 
 add_library(cls_journal_client STATIC
   journal/cls_journal_client.cc
@@ -112,7 +114,7 @@ if (WITH_RADOSGW)
     ${CMAKE_SOURCE_DIR}/src/common/ceph_json.cc)
   target_link_libraries(cls_rgw json_spirit)
   set_target_properties(cls_rgw PROPERTIES VERSION "1.0.0" SOVERSION "1")
-  install(TARGETS cls_rgw DESTINATION lib/rados-classes)
+  install(TARGETS cls_rgw DESTINATION ${cls_dir})
 
   add_library(cls_rgw_client STATIC
     rgw/cls_rgw_client.cc
@@ -125,7 +127,7 @@ if (WITH_CEPHFS)
   add_library(cls_cephfs SHARED
     cephfs/cls_cephfs.cc)
   set_target_properties(cls_cephfs PROPERTIES VERSION "1.0.0" SOVERSION "1")
-  install(TARGETS cls_cephfs DESTINATION lib/rados-classes)
+  install(TARGETS cls_cephfs DESTINATION ${cls_dir})
 
   add_library(cls_cephfs_client STATIC
     cephfs/cls_cephfs_client.cc)
index 0b223c812a4d28486935b0372aa5aee375f04f0a..2bc837b870fc1f8b14fde2d516d2a417121ee86b 100644 (file)
@@ -48,5 +48,5 @@ add_tracing_library(rados_tp librados.tp 2.0.0)
 add_tracing_library(rbd_tp librbd.tp 1.0.0)
 add_tracing_library(os_tp objectstore.tp 1.0.0)
 
-install(TARGETS rados_tp osd_tp rbd_tp os_tp DESTINATION lib)
+install(TARGETS rados_tp osd_tp rbd_tp os_tp DESTINATION ${CMAKE_INSTALL_LIBDIR})