Skip to content

Commit

Permalink
fix libfmt debug build name error (OpenAtomFoundation#1476)
Browse files Browse the repository at this point in the history
  • Loading branch information
lqxhub authored May 10, 2023
1 parent 9303e44 commit 712963a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,16 @@ ExternalProject_Add(fmt
make -j${CPU_CORE}
)

if(${LIB_BUILD_TYPE} STREQUAL DEBUG)
set(LIB_FMT libfmtd.a)
else()
set(LIB_FMT libfmt.a)
endif()

if(${OS_VERSION} MATCHES "CentOS")
set(FMT_LIBRARY ${INSTALL_LIBDIR_64}/libfmt.a)
set(FMT_LIBRARY ${INSTALL_LIBDIR_64}/${LIB_FMT})
else()
set(FMT_LIBRARY ${INSTALL_LIBDIR}/libfmt.a)
set(FMT_LIBRARY ${INSTALL_LIBDIR}/${LIB_FMT})
endif()

set(FMT_INCLUDE_DIR ${INSTALL_INCLUDEDIR})
Expand Down Expand Up @@ -677,7 +683,7 @@ target_link_libraries(${PROJECT_NAME}
librocksdb.a
${LIB_PROTOBUF}
${LIB_GFLAGS}
libfmt.a
${LIB_FMT}
libsnappy.a
libzstd.a
liblz4.a
Expand Down

0 comments on commit 712963a

Please sign in to comment.