Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dhtnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
dhtnet
Commits
a4030cd8
Commit
a4030cd8
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
add pkgconfig file
Change-Id: I8948adf1e15a2baad3d67400d8940902807bf9ed
parent
8f48214c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+12
-2
12 additions, 2 deletions
CMakeLists.txt
dhtnet.pc.in
+10
-0
10 additions, 0 deletions
dhtnet.pc.in
with
22 additions
and
2 deletions
CMakeLists.txt
+
12
−
2
View file @
a4030cd8
...
...
@@ -5,6 +5,10 @@ set(CMAKE_CXX_STANDARD 17)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
include
(
CTest
)
include
(
GNUInstallDirs
)
set
(
prefix
${
CMAKE_INSTALL_PREFIX
}
)
set
(
exec_prefix
"
\$
{prefix}"
)
set
(
libdir
"
${
CMAKE_INSTALL_FULL_LIBDIR
}
"
)
set
(
includedir
"
${
CMAKE_INSTALL_FULL_INCLUDEDIR
}
"
)
find_package
(
PkgConfig REQUIRED
)
find_package
(
msgpack REQUIRED QUIET CONFIG NAMES msgpack msgpack-cxx
)
...
...
@@ -39,12 +43,18 @@ target_include_directories(dhtnet PUBLIC
$<INSTALL_INTERFACE:include>
)
target_compile_definitions
(
dhtnet PUBLIC PJ_AUTOCONF=1
)
set_target_properties
(
dhtnet PROPERTIES PUBLIC_HEADER
"
${
dhtnet_HEADERS
}
"
)
configure_file
(
dhtnet.pc.in dhtnet.pc @ONLY
)
install
(
TARGETS dhtnet
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/dhtnet
)
# Install targets
install
(
DIRECTORY include DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/opendht.pc DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/pkgconfig
)
if
(
BUILD_TESTING AND NOT MSVC
)
pkg_search_module
(
Cppunit REQUIRED IMPORTED_TARGET cppunit
)
add_executable
(
tests_certstore tests/certstore.cpp
)
...
...
This diff is collapsed.
Click to expand it.
dhtnet.pc.in
0 → 100644
+
10
−
0
View file @
a4030cd8
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: dhtnet
Description: C++ peer to peer networking library
Version: @VERSION@
Requires: opendht >= 2.6
Requires.private: pjproject
Cflags: -I${includedir}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment