Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
glog
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
glog
Commits
40fc2146
Commit
40fc2146
authored
Jul 06, 2017
by
Shinichiro Hamaji
Committed by
GitHub
Jul 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #153 from sergiud/cmake-gnu-install-dirs
cmake: do not hardcode relative install directories
parents
a9b9ee8e
b3dea50f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
CMakeLists.txt
CMakeLists.txt
+15
-8
No files found.
CMakeLists.txt
View file @
40fc2146
...
...
@@ -46,6 +46,7 @@ include (CMakePackageConfigHelpers)
include
(
CPack
)
include
(
CTest
)
include
(
DetermineGflagsNamespace
)
include
(
GNUInstallDirs
)
set
(
CMAKE_THREAD_PREFER_PTHREAD 1
)
...
...
@@ -440,10 +441,15 @@ endif (WIN32)
set_target_properties (glog PROPERTIES PUBLIC_HEADER "
${
GLOG_PUBLIC_H
}
")
set (_glog_CMake_BINDIR
${
CMAKE_INSTALL_BINDIR
}
)
set (_glog_CMake_INCLUDE_DIR
${
CMAKE_INSTALL_INCLUDEDIR
}
)
set (_glog_CMake_LIBDIR
${
CMAKE_INSTALL_LIBDIR
}
)
set (_glog_CMake_INSTALLDIR
${
_glog_CMake_LIBDIR
}
/cmake/glog)
target_include_directories (glog BEFORE PUBLIC
"
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_BINARY_DIR
}
>
"
"
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/src>
"
"
$<INSTALL_INTERFACE:
include
>
"
"
$<INSTALL_INTERFACE:
${
_glog_CMake_INCLUDE_DIR
}
>
"
PRIVATE
${
CMAKE_CURRENT_BINARY_DIR
}
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src)
...
...
@@ -585,10 +591,10 @@ endif (BUILD_TESTING)
install
(
TARGETS glog
EXPORT glog-targets
RUNTIME DESTINATION
bin
PUBLIC_HEADER DESTINATION
include
/glog
LIBRARY DESTINATION
lib
ARCHIVE DESTINATION
lib
)
RUNTIME DESTINATION
${
_glog_CMake_BINDIR
}
PUBLIC_HEADER DESTINATION
${
_glog_CMake_INCLUDE_DIR
}
/glog
LIBRARY DESTINATION
${
_glog_CMake_LIBDIR
}
ARCHIVE DESTINATION
${
_glog_CMake_LIBDIR
}
)
if
(
gflags_FOUND
)
set
(
gflags_DEPENDENCY
"find_dependency (gflags
${
gflags_VERSION
}
)"
)
...
...
@@ -596,7 +602,7 @@ endif (gflags_FOUND)
configure_package_config_file
(
glog-config.cmake.in
${
CMAKE_CURRENT_BINARY_DIR
}
/glog-config.cmake
INSTALL_DESTINATION
lib/cmake/glog
INSTALL_DESTINATION
${
_glog_CMake_INSTALLDIR
}
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
write_basic_package_version_file
(
glog-config-version.cmake VERSION
...
...
@@ -608,6 +614,7 @@ export (PACKAGE glog)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/glog-config.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/glog-config-version.cmake
DESTINATION
lib/cmake/glog
)
DESTINATION
${
_glog_CMake_INSTALLDIR
}
)
install
(
EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog
)
install
(
EXPORT glog-targets NAMESPACE glog:: DESTINATION
${
_glog_CMake_INSTALLDIR
}
)
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