mirror of
https://github.com/fmtlib/fmt.git
synced 2024-09-03 21:49:01 +00:00
Configure fmt.pc library name correctly.
Simplify getting library name. Add FMT_DEBUG_SUFFIX variable.
This commit is contained in:
parent
1acb73f970
commit
6c30f41443
@ -174,9 +174,17 @@ target_include_directories(fmt PUBLIC
|
|||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>)
|
$<INSTALL_INTERFACE:include>)
|
||||||
|
|
||||||
|
set(FMT_DEBUG_POSTFIX d)
|
||||||
|
|
||||||
set_target_properties(fmt PROPERTIES
|
set_target_properties(fmt PROPERTIES
|
||||||
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
|
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
|
||||||
DEBUG_POSTFIX d)
|
DEBUG_POSTFIX ${FMT_DEBUG_POSTFIX})
|
||||||
|
|
||||||
|
# Set FMT_LIB_NAME for pkg-config fmt.pc.
|
||||||
|
get_target_property(FMT_LIB_NAME fmt OUTPUT_NAME)
|
||||||
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
set(FMT_LIB_NAME ${FMT_LIB_NAME}${FMT_DEBUG_POSTFIX})
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||||
|
@ -6,6 +6,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
|||||||
Name: fmt
|
Name: fmt
|
||||||
Description: A modern formatting library
|
Description: A modern formatting library
|
||||||
Version: @FMT_VERSION@
|
Version: @FMT_VERSION@
|
||||||
Libs: -L${libdir} -lfmt
|
Libs: -L${libdir} -l@FMT_LIB_NAME@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user