mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-28 00:10:21 +08:00
Fixed pkg-config
This commit is contained in:
parent
32d83ee246
commit
e6e2ffbf51
@ -352,7 +352,7 @@ if(SPDLOG_INSTALL)
|
|||||||
# ---------------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------------
|
||||||
# Include files
|
# Include files
|
||||||
# ---------------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------------
|
||||||
install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" PATTERN "fmt/bundled" EXCLUDE)
|
install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
install(
|
install(
|
||||||
TARGETS spdlog fmt
|
TARGETS spdlog fmt
|
||||||
EXPORT spdlog
|
EXPORT spdlog
|
||||||
@ -373,10 +373,8 @@ if(SPDLOG_INSTALL)
|
|||||||
else()
|
else()
|
||||||
set(PKG_CONFIG_LIBDIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
set(PKG_CONFIG_LIBDIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
||||||
endif()
|
endif()
|
||||||
get_target_property(PKG_CONFIG_DEFINES spdlog INTERFACE_COMPILE_DEFINITIONS)
|
configure_file("cmake/spdlog.pc.in" "${pkg_config}" @ONLY)
|
||||||
string(REPLACE ";" " -D" PKG_CONFIG_DEFINES "${PKG_CONFIG_DEFINES}")
|
message(STATUS "Installing pkg-config ${pkg_config} in ${pkgconfig_install_dir}")
|
||||||
string(CONCAT PKG_CONFIG_DEFINES "-D" "${PKG_CONFIG_DEFINES}")
|
|
||||||
configure_file("cmake/${PROJECT_NAME}.pc.in" "${pkg_config}" @ONLY)
|
|
||||||
install(FILES "${pkg_config}" DESTINATION "${pkgconfig_install_dir}")
|
install(FILES "${pkg_config}" DESTINATION "${pkgconfig_install_dir}")
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------------
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
includedir=@PKG_CONFIG_INCLUDEDIR@
|
libdir=${exec_prefix}/lib
|
||||||
libdir=@PKG_CONFIG_LIBDIR@
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: lib@PROJECT_NAME@
|
Name: @PROJECT_NAME@
|
||||||
Description: Fast C++ logging library.
|
Description: Fast C++ logging library.
|
||||||
URL: https://github.com/gabime/@PROJECT_NAME@
|
URL: https://github.com/gabime/spdlog.git
|
||||||
Version: @SPDLOG_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
CFlags: -I${includedir} @PKG_CONFIG_DEFINES@
|
|
||||||
Libs: -L${libdir} -lspdlog -pthread
|
|
||||||
Requires: @PKG_CONFIG_REQUIRES@
|
|
||||||
|
|
||||||
|
Requires: fmt
|
||||||
|
Libs: -L${libdir} -lspdlog
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
Loading…
Reference in New Issue
Block a user