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
411d588f
Unverified
Commit
411d588f
authored
Apr 10, 2019
by
Gabi Melman
Committed by
GitHub
Apr 10, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1058 from mnemotic/cmake-fmt-header-only
Add a CMake option to use a header-only external fmt
parents
02329f61
7e63d773
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
CMakeLists.txt
CMakeLists.txt
+11
-5
No files found.
CMakeLists.txt
View file @
411d588f
...
@@ -53,12 +53,9 @@ option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
...
@@ -53,12 +53,9 @@ option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
option
(
SPDLOG_BUILD_BENCH
"Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)"
OFF
)
option
(
SPDLOG_BUILD_BENCH
"Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)"
OFF
)
option
(
SPDLOG_BUILD_TESTS
"Build tests"
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_BUILD_TESTS
"Build tests"
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_FMT_EXTERNAL
"Use external fmt library instead of bundled"
OFF
)
option
(
SPDLOG_FMT_EXTERNAL
"Use external fmt library instead of bundled"
OFF
)
option
(
SPDLOG_FMT_HEADER_ONLY
"Use header-only variant of external fmt library"
ON
)
option
(
SPDLOG_INSTALL
"Generate the install target."
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_INSTALL
"Generate the install target."
${
SPDLOG_MASTER_PROJECT
}
)
if
(
SPDLOG_FMT_EXTERNAL AND NOT TARGET fmt::fmt
)
find_package
(
fmt REQUIRED CONFIG
)
endif
()
target_include_directories
(
target_include_directories
(
spdlog
spdlog
INTERFACE
INTERFACE
...
@@ -68,7 +65,16 @@ target_include_directories(
...
@@ -68,7 +65,16 @@ target_include_directories(
if
(
SPDLOG_FMT_EXTERNAL
)
if
(
SPDLOG_FMT_EXTERNAL
)
target_compile_definitions
(
spdlog INTERFACE SPDLOG_FMT_EXTERNAL
)
target_compile_definitions
(
spdlog INTERFACE SPDLOG_FMT_EXTERNAL
)
target_link_libraries
(
spdlog INTERFACE fmt::fmt
)
if
(
NOT TARGET fmt::fmt
)
find_package
(
fmt REQUIRED CONFIG
)
endif
()
if
(
SPDLOG_FMT_HEADER_ONLY
)
target_link_libraries
(
spdlog INTERFACE fmt::fmt-header-only
)
else
()
target_link_libraries
(
spdlog INTERFACE fmt::fmt
)
endif
()
endif
()
endif
()
set
(
HEADER_BASE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include"
)
set
(
HEADER_BASE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include"
)
...
...
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