-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed fix for issue #1264 #1534
Conversation
Thanks for the PR! |
CMakeLists.txt
Outdated
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) | ||
if(CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
get_target_property(_FMT_LIB_POSTFIX ${PROJECT_NAME_LOWER} DEBUG_POSTFIX) | ||
set(FMT_LIB_NAME ${PROJECT_NAME_LOWER}${_FMT_LIB_POSTFIX}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest defining FMT_DEBUG_POSTFIX
and using it here and to set target postfix in line 177 above instead of getting it from the properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like so?
set(FMT_DEBUG_POSTFIX d)
set_target_properties(fmt PROPERTIES
OUTPUT_NAME fmt
VERSION ${FMT_VERSION}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
DEBUG_POSTFIX ${FMT_DEBUG_POSTFIX})
# Configure pkg-config fmt.pc properly
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()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. This simplifies the logic a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed.
Merged in 6c30f41, thanks! |
Fixes for issue:
#1264
I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.