Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
9986589f
Commit
9986589f
authored
Apr 06, 2017
by
Joao Paulo Magalhaes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/google/benchmark
parents
ea26e62a
9a5072d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
7 deletions
+35
-7
Config.cmake.in
cmake/Config.cmake.in
+1
-0
CMakeLists.txt
src/CMakeLists.txt
+34
-7
No files found.
cmake/Config.cmake.in
0 → 100644
View file @
9986589f
include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
src/CMakeLists.txt
View file @
9986589f
...
@@ -31,18 +31,45 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
...
@@ -31,18 +31,45 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
target_link_libraries
(
benchmark Shlwapi
)
target_link_libraries
(
benchmark Shlwapi
)
endif
()
endif
()
# Expose public API
set
(
include_install_dir
"include"
)
target_include_directories
(
benchmark PUBLIC
${
PROJECT_SOURCE_DIR
}
/include
)
set
(
lib_install_dir
"lib/"
)
set
(
bin_install_dir
"bin/"
)
set
(
config_install_dir
"lib/cmake/
${
PROJECT_NAME
}
"
)
set
(
generated_dir
"
${
CMAKE_CURRENT_BINARY_DIR
}
/generated"
)
set
(
version_config
"
${
generated_dir
}
/
${
PROJECT_NAME
}
ConfigVersion.cmake"
)
set
(
project_config
"
${
generated_dir
}
/
${
PROJECT_NAME
}
Config.cmake"
)
set
(
targets_export_name
"
${
PROJECT_NAME
}
Targets"
)
set
(
namespace
"
${
PROJECT_NAME
}
::"
)
include
(
CMakePackageConfigHelpers
)
write_basic_package_version_file
(
"
${
version_config
}
"
VERSION
${
GIT_VERSION
}
COMPATIBILITY SameMajorVersion
)
configure_file
(
"
${
CMAKE_SOURCE_DIR
}
/cmake/Config.cmake.in"
"
${
project_config
}
"
@ONLY
)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
install
(
install
(
TARGETS benchmark
TARGETS benchmark
ARCHIVE DESTINATION lib
EXPORT
${
targets_export_name
}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION
${
lib_install_dir
}
RUNTIME DESTINATION bin
LIBRARY DESTINATION
${
lib_install_dir
}
COMPONENT library
)
RUNTIME DESTINATION
${
bin_install_dir
}
INCLUDES DESTINATION
${
include_install_dir
}
)
install
(
install
(
DIRECTORY
"
${
PROJECT_SOURCE_DIR
}
/include/benchmark"
DIRECTORY
"
${
PROJECT_SOURCE_DIR
}
/include/benchmark"
DESTINATION
include
DESTINATION
${
include_install_dir
}
FILES_MATCHING PATTERN
"*.*h"
)
FILES_MATCHING PATTERN
"*.*h"
)
install
(
FILES
"
${
project_config
}
"
"
${
version_config
}
"
DESTINATION
"
${
config_install_dir
}
"
)
install
(
EXPORT
"
${
targets_export_name
}
"
NAMESPACE
"
${
namespace
}
"
DESTINATION
"
${
config_install_dir
}
"
)
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