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
c94a60e2
Commit
c94a60e2
authored
Nov 25, 2016
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enh: Configure and install pkg-config .pc file
parent
3e7ef74a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
CMakeLists.txt
CMakeLists.txt
+16
-7
package.pc.in
cmake/package.pc.in
+14
-0
No files found.
CMakeLists.txt
View file @
c94a60e2
...
...
@@ -83,11 +83,13 @@ include (utils)
# ----------------------------------------------------------------------------
# package information
set
(
PACKAGE_NAME
"gflags"
)
set
(
PACKAGE_VERSION
"2.2.0"
)
set
(
PACKAGE_STRING
"
${
PACKAGE_NAME
}
${
PACKAGE_VERSION
}
"
)
set
(
PACKAGE_TARNAME
"
${
PACKAGE_NAME
}
-
${
PACKAGE_VERSION
}
"
)
set
(
PACKAGE_BUGREPORT
"https://github.com/gflags/gflags/issues"
)
set
(
PACKAGE_NAME
"gflags"
)
set
(
PACKAGE_VERSION
"2.2.0"
)
set
(
PACKAGE_STRING
"
${
PACKAGE_NAME
}
${
PACKAGE_VERSION
}
"
)
set
(
PACKAGE_TARNAME
"
${
PACKAGE_NAME
}
-
${
PACKAGE_VERSION
}
"
)
set
(
PACKAGE_BUGREPORT
"https://github.com/gflags/gflags/issues"
)
set
(
PACKAGE_DESCRIPTION
"A commandline flags library that allows for distributed flags."
)
set
(
PACKAGE_URL
"http://gflags.github.io/gflags"
)
project
(
${
PACKAGE_NAME
}
CXX
)
if
(
CMAKE_VERSION VERSION_LESS 100
)
...
...
@@ -399,6 +401,7 @@ if (OS_WINDOWS)
set
(
LIBRARY_INSTALL_DIR Lib
)
set
(
INCLUDE_INSTALL_DIR Include
)
set
(
CONFIG_INSTALL_DIR CMake
)
set
(
PKGCONFIG_INSTALL_DIR
)
else
()
set
(
RUNTIME_INSTALL_DIR bin
)
# The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora
...
...
@@ -411,6 +414,7 @@ else ()
gflags_property
(
LIBRARY_INSTALL_DIR ADVANCED TRUE
)
set
(
INCLUDE_INSTALL_DIR include
)
set
(
CONFIG_INSTALL_DIR
${
LIBRARY_INSTALL_DIR
}
/cmake/
${
PACKAGE_NAME
}
)
set
(
PKGCONFIG_INSTALL_DIR
${
LIBRARY_INSTALL_DIR
}
/pkgconfig
)
endif
()
# ----------------------------------------------------------------------------
...
...
@@ -526,6 +530,11 @@ if (INSTALL_HEADERS)
endif
()
endif
()
if
(
PKGCONFIG_INSTALL_DIR
)
configure_file
(
"cmake/package.pc.in"
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
.pc"
@ONLY
)
install
(
FILES
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
.pc"
DESTINATION
"
${
PKGCONFIG_INSTALL_DIR
}
"
)
endif
()
# ----------------------------------------------------------------------------
# support direct use of build tree
set
(
INSTALL_PREFIX_REL2CONFIG_DIR .
)
...
...
@@ -593,7 +602,7 @@ if (BUILD_PACKAGING)
set
(
CPACK_PACKAGE_VERSION_MAJOR
"
${
PACKAGE_VERSION_MAJOR
}
"
)
set
(
CPACK_PACKAGE_VERSION_MINOR
"
${
PACKAGE_VERSION_MINOR
}
"
)
set
(
CPACK_PACKAGE_VERSION_PATCH
"
${
PACKAGE_VERSION_PATCH
}
"
)
set
(
CPACK_PACKAGE_DESCRIPTION_SUMMARY
"
A commandline flags library that allows for distributed flags.
"
)
set
(
CPACK_PACKAGE_DESCRIPTION_SUMMARY
"
${
PACKAGE_DESCRIPTION
}
"
)
set
(
CPACK_RESOURCE_FILE_WELCOME
"
${
CMAKE_CURRENT_BINARY_DIR
}
/README.txt"
)
set
(
CPACK_RESOURCE_FILE_LICENSE
"
${
CMAKE_CURRENT_LIST_DIR
}
/COPYING.txt"
)
set
(
CPACK_PACKAGE_DESCRIPTION_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/README.txt"
)
...
...
@@ -605,7 +614,7 @@ if (BUILD_PACKAGING)
# RPM package information -- used in cmake/package.cmake.in also for DEB
set
(
CPACK_RPM_PACKAGE_GROUP
"Development/Libraries"
)
set
(
CPACK_RPM_PACKAGE_LICENSE
"BSD"
)
set
(
CPACK_RPM_PACKAGE_URL
"
http://gflags.github.io/gflags
"
)
set
(
CPACK_RPM_PACKAGE_URL
"
${
PACKAGE_URL
}
"
)
set
(
CPACK_RPM_CHANGELOG_FILE
"
${
CMAKE_CURRENT_LIST_DIR
}
/ChangeLog.txt"
)
if
(
INSTALL_HEADERS
)
...
...
cmake/package.pc.in
0 → 100644
View file @
c94a60e2
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
bindir=${prefix}/@RUNTIME_INSTALL_DIR@
libdir=${prefix}/@LIBRARY_INSTALL_DIR@
includedir=${prefix}/@INCLUDE_INSTALL_DIR@
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Description: @PACKAGE_DESCRIPTION@
URL: @PACKAGE_URL@
Requires:
Libs: -L${libdir} -lgflags
Libs.private: -lpthread
Cflags: -I${includedir}
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