Fix rpmlint warning about unused dependency on libm.so.6

This commit is contained in:
vitaut 2015-07-10 07:02:50 -07:00
parent 6cf24c7f92
commit e498ffbb3d

View File

@ -90,6 +90,11 @@ if (BIICODE)
endif ()
add_library(cppformat ${FMT_SOURCES})
if (BUILD_SHARED_LIBS)
# Fix rpmlint warning:
# unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6.
target_link_libraries(cppformat -Wl,--as-needed)
endif ()
if (FMT_PEDANTIC AND CMAKE_COMPILER_IS_GNUCXX)
set_target_properties(cppformat PROPERTIES COMPILE_FLAGS
"-Wall -Wextra -Wshadow -pedantic")