Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
ab110552
Unverified
Commit
ab110552
authored
Sep 23, 2019
by
Gabi Melman
Committed by
GitHub
Sep 23, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1238 from orbea/pkgconfig
cmake: Add a new spdlog.pc pkgconfig file.
parents
d70b743e
58891012
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
CMakeLists.txt
CMakeLists.txt
+8
-0
spdlog.pc.in
cmake/spdlog.pc.in
+11
-0
No files found.
CMakeLists.txt
View file @
ab110552
...
...
@@ -86,6 +86,7 @@ set(SPDLOG_SRCS
src/file_sinks.cpp
src/async.cpp
)
set
(
SPDLOG_CFLAGS
"
${
PROJECT_NAME
}
"
)
if
(
SPDLOG_BUILD_SHARED
)
if
(
WIN32
)
...
...
@@ -128,6 +129,8 @@ if(SPDLOG_FMT_EXTERNAL)
find_package
(
fmt REQUIRED
)
endif
()
set
(
SPDLOG_CFLAGS
"
${
SPDLOG_CFLAGS
}
-DSPDLOG_FMT_EXTERNAL"
)
target_compile_definitions
(
spdlog PUBLIC SPDLOG_FMT_EXTERNAL
)
target_link_libraries
(
spdlog PUBLIC fmt::fmt
)
...
...
@@ -180,6 +183,8 @@ if (SPDLOG_INSTALL)
set
(
config_targets_file
"spdlogConfigTargets.cmake"
)
set
(
version_config_file
"
${
CMAKE_CURRENT_BINARY_DIR
}
/spdlogConfigVersion.cmake"
)
set
(
export_dest_dir
"
${
CMAKE_INSTALL_LIBDIR
}
/spdlog/cmake"
)
set
(
pkgconfig_install_dir
"
${
CMAKE_INSTALL_LIBDIR
}
/pkgconfig"
)
set
(
pkg_config
"
${
CMAKE_BINARY_DIR
}
/
${
PROJECT_NAME
}
.pc"
)
#---------------------------------------------------------------------------------------
# Include files
...
...
@@ -190,6 +195,9 @@ if (SPDLOG_INSTALL)
#---------------------------------------------------------------------------------------
# Package and version files
#---------------------------------------------------------------------------------------
configure_file
(
"cmake/
${
PROJECT_NAME
}
.pc.in"
"
${
pkg_config
}
"
@ONLY
)
install
(
FILES
"
${
pkg_config
}
"
DESTINATION
"
${
pkgconfig_install_dir
}
"
)
install
(
EXPORT spdlog
DESTINATION
${
export_dest_dir
}
NAMESPACE spdlog::
...
...
cmake/spdlog.pc.in
0 → 100644
View file @
ab110552
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
Name: lib@PROJECT_NAME@
Description: Fast C++ logging library.
URL: https://github.com/gabime/@PROJECT_NAME@
Version: @SPDLOG_VERSION@
CFlags: -I${includedir}/@SPDLOG_CFLAGS@
Libs: -L${libdir}/@PROJECT_NAME@ -l@PROJECT_NAME@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment