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
2e75f42c
Commit
2e75f42c
authored
May 23, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install using GNUInstallDirs in cmake
parent
c9547f38
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
CMakeLists.txt
CMakeLists.txt
+7
-6
No files found.
CMakeLists.txt
View file @
2e75f42c
...
...
@@ -4,6 +4,7 @@
cmake_minimum_required
(
VERSION 3.1
)
project
(
spdlog VERSION 1.3.1 LANGUAGES CXX
)
include
(
CMakeDependentOption
)
include
(
GNUInstallDirs
)
#---------------------------------------------------------------------------------------
# set default build to release
...
...
@@ -57,7 +58,7 @@ add_library(spdlog STATIC src/spdlog.cpp)
target_compile_definitions
(
spdlog PUBLIC SPDLOG_COMPILED_LIB
)
target_include_directories
(
spdlog PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_LIST_DIR
}
/include>"
"$<INSTALL_INTERFACE:
include>"
)
"$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>"
)
target_link_libraries
(
spdlog PUBLIC Threads::Threads
)
#---------------------------------------------------------------------------------------
...
...
@@ -67,7 +68,7 @@ add_library(spdlog_header_only INTERFACE)
target_include_directories
(
spdlog_header_only INTERFACE
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_LIST_DIR
}
/include>"
"$<INSTALL_INTERFACE:
include>"
)
"$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>"
)
target_link_libraries
(
spdlog_header_only INTERFACE Threads::Threads
)
#---------------------------------------------------------------------------------------
...
...
@@ -116,13 +117,13 @@ if (SPDLOG_INSTALL)
set
(
project_config_out
"
${
CMAKE_CURRENT_BINARY_DIR
}
/spdlogConfig.cmake"
)
set
(
config_targets_file
"spdlogConfigTargets.cmake"
)
set
(
version_config_file
"
${
CMAKE_CURRENT_BINARY_DIR
}
/spdlogConfigVersion.cmake"
)
set
(
export_dest_dir
lib/spdlog/cmake
)
set
(
export_dest_dir
"
${
CMAKE_INSTALL_LIBDIR
}
/spdlog/cmake"
)
#---------------------------------------------------------------------------------------
#
lib in include files
#
include files
#---------------------------------------------------------------------------------------
install
(
DIRECTORY include/ DESTINATION
include
)
install
(
TARGETS spdlog spdlog_header_only EXPORT spdlog DESTINATION
lib
)
install
(
DIRECTORY include/ DESTINATION
"
${
CMAKE_INSTALL_INCLUDEDIR
}
"
)
install
(
TARGETS spdlog spdlog_header_only EXPORT spdlog DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
/spdlog"
)
#---------------------------------------------------------------------------------------
# package and version files
...
...
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