Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gflags
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
gflags
Commits
3064f63a
Commit
3064f63a
authored
Nov 24, 2016
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enh: Avoid use of install(EXPORTS) FILE option
parent
14c0e937
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
CMakeLists.txt
CMakeLists.txt
+5
-4
config.cmake.in
cmake/config.cmake.in
+1
-1
No files found.
CMakeLists.txt
View file @
3064f63a
...
...
@@ -482,6 +482,7 @@ endif ()
# ----------------------------------------------------------------------------
# installation rules
set
(
EXPORT_NAME
${
PACKAGE_NAME
}
-targets
)
file
(
RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/
${
CONFIG_INSTALL_DIR
}
"
"
${
CMAKE_INSTALL_PREFIX
}
"
)
configure_file
(
cmake/config.cmake.in
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
-config-install.cmake"
@ONLY
)
configure_file
(
cmake/version.cmake.in
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
-config-version.cmake"
@ONLY
)
...
...
@@ -489,14 +490,14 @@ configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-co
if
(
BUILD_SHARED_LIBS AND INSTALL_SHARED_LIBS
)
foreach
(
opts IN ITEMS
""
_nothreads
)
if
(
BUILD_gflags
${
opts
}
_LIB
)
install
(
TARGETS gflags
${
opts
}
_shared DESTINATION
${
LIBRARY_INSTALL_DIR
}
EXPORT
gflags-lib
)
install
(
TARGETS gflags
${
opts
}
_shared DESTINATION
${
LIBRARY_INSTALL_DIR
}
EXPORT
${
EXPORT_NAME
}
)
endif
()
endforeach
()
endif
()
if
(
BUILD_STATIC_LIBS AND INSTALL_STATIC_LIBS
)
foreach
(
opts IN ITEMS
""
_nothreads
)
if
(
BUILD_gflags
${
opts
}
_LIB
)
install
(
TARGETS gflags
${
opts
}
_static DESTINATION
${
LIBRARY_INSTALL_DIR
}
EXPORT
gflags-lib
)
install
(
TARGETS gflags
${
opts
}
_static DESTINATION
${
LIBRARY_INSTALL_DIR
}
EXPORT
${
EXPORT_NAME
}
)
endif
()
endforeach
()
endif
()
...
...
@@ -512,7 +513,7 @@ if (INSTALL_HEADERS)
FILES
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
-config-version.cmake"
DESTINATION
${
CONFIG_INSTALL_DIR
}
)
install
(
EXPORT
gflags-lib DESTINATION
${
CONFIG_INSTALL_DIR
}
FILE
${
PACKAGE_NAME
}
-targets.cmake
)
install
(
EXPORT
${
EXPORT_NAME
}
DESTINATION
${
CONFIG_INSTALL_DIR
}
)
if
(
UNIX
)
install
(
PROGRAMS src/gflags_completions.sh DESTINATION
${
RUNTIME_INSTALL_DIR
}
)
endif
()
...
...
@@ -521,7 +522,7 @@ endif ()
# ----------------------------------------------------------------------------
# support direct use of build tree
set
(
INSTALL_PREFIX_REL2CONFIG_DIR .
)
export
(
TARGETS
${
TARGETS
}
FILE
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
-targets
.cmake"
)
export
(
TARGETS
${
TARGETS
}
FILE
"
${
PROJECT_BINARY_DIR
}
/
${
EXPORT_NAME
}
.cmake"
)
export
(
PACKAGE gflags
)
configure_file
(
cmake/config.cmake.in
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
-config.cmake"
@ONLY
)
...
...
cmake/config.cmake.in
View file @
3064f63a
...
...
@@ -7,7 +7,7 @@ set (@PACKAGE_PREFIX@_VERSION_MINOR @PACKAGE_VERSION_MINOR@)
set (@PACKAGE_PREFIX@_VERSION_PATCH @PACKAGE_VERSION_PATCH@)
# import targets
include ("${CMAKE_CURRENT_LIST_DIR}/@
PACKAGE_NAME@-targets
.cmake")
include ("${CMAKE_CURRENT_LIST_DIR}/@
EXPORT_NAME@
.cmake")
# installation prefix
get_filename_component (CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
...
...
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