-
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
Wrong library name in fmt.pc when building Debug. #1264
Comments
It is convenient to distinguish between debug and release versions of the library and it allows placing them in one directory. |
Debug libraries are easily generated separately by changing
CMAKE_INSTALL_PREFIX. The issue is in my view in generating wrong pc file.
It should derive from target file name.
…On Wed, Aug 14, 2019 at 7:29 AM Victor Zverovich ***@***.***> wrote:
fmt.pc currently expects that the release version of the library is
installed. If you want to add support for debug libraries there, please
submit a PR.
It seems unnecessary to have different names for library builds?
It is convenient to distinguish between debug and release versions of the
library and it allows placing them in one directory.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1264?email_source=notifications&email_token=AA4F77Q6435DXQXJBQAJAPDQEQJEZA5CNFSM4ILF24UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4I7FGA#issuecomment-521269912>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4F77TIJZTXXBTOJYUDZF3QEQJEZANCNFSM4ILF24UA>
.
|
I'm glad to add support for this are you ok with my solution in the ticket?
…On Thu, Aug 15, 2019 at 2:52 PM A. Mark ***@***.***> wrote:
Debug libraries are easily generated separately by changing
CMAKE_INSTALL_PREFIX. The issue is in my view in generating wrong pc file.
It should derive from target file name.
On Wed, Aug 14, 2019 at 7:29 AM Victor Zverovich ***@***.***>
wrote:
> fmt.pc currently expects that the release version of the library is
> installed. If you want to add support for debug libraries there, please
> submit a PR.
>
> It seems unnecessary to have different names for library builds?
>
> It is convenient to distinguish between debug and release versions of the
> library and it allows placing them in one directory.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1264?email_source=notifications&email_token=AA4F77Q6435DXQXJBQAJAPDQEQJEZA5CNFSM4ILF24UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4I7FGA#issuecomment-521269912>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AA4F77TIJZTXXBTOJYUDZF3QEQJEZANCNFSM4ILF24UA>
> .
>
|
I'm fine with the solution "to configure fmt.pc via variable". Thanks! |
The wrong library name is configured in fmt.pc file when with CMAKE_BUILD_TYPE=Debug.
As a result
$pkg-config --libs fmt
Returns -lfmt however the library name is actually "fmtd". The solution is to configure fmt.pc via variable. For example
...
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
library=@FMT_LIBRARY_NAME@
Name: fmt
Description: A modern formatting library
Version: @FMT_VERSION@
Libs: -L${libdir} -l${library}
Cflags: -I${includedir}
Alternately change:
CMakeLists.txt:183
set_target_properties(fmt PROPERTIES
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
DEBUG_POSTFIX d)
It seems unnecessary to have different names for library builds?
The text was updated successfully, but these errors were encountered: