]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: build static libs if they are internal ones 39566/head
authorKefu Chai <kchai@redhat.com>
Fri, 19 Feb 2021 04:04:32 +0000 (12:04 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 19 Feb 2021 04:10:15 +0000 (12:10 +0800)
there are chances that user or build script set `BUILD_SHARED_LIBS`,
so these convenience libraries (using the autotools' terminology)
are built and linked by never get installed.

Fixes: https://tracker.ceph.com/issues/38611
Fixes: https://tracker.ceph.com/issues/49080
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/blk/CMakeLists.txt
src/common/CMakeLists.txt

index c1de15ecfb7d7146be8740902bb84ae11e289cc6..b397d47338b0413e16240fc86d7c6e10440a0669 100644 (file)
@@ -25,7 +25,7 @@ if(WITH_ZBD)
     zoned/HMSMRDevice.cc)
 endif()
 
-add_library(blk ${libblk_srcs})
+add_library(blk STATIC ${libblk_srcs})
 target_include_directories(blk PRIVATE "./")
 
 if(HAVE_LIBAIO)
index 6f29dfef35080614a59d20ff6c2afc237d065cf0..498e2dd2de011f5155824cf0fd69bd14ae4d4474 100644 (file)
@@ -213,7 +213,7 @@ elseif(HAVE_ARMV8_CRC)
     crc32c_aarch64.c)
 endif(HAVE_INTEL)
 
-add_library(crc32 ${crc32_srcs})
+add_library(crc32 STATIC ${crc32_srcs})
 if(HAVE_ARMV8_CRC)
   set_target_properties(crc32 PROPERTIES
     COMPILE_FLAGS "${CMAKE_C_FLAGS} ${ARMV8_CRC_COMPILE_FLAGS}")