Skip to content
GitLab
Explore
Sign in
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
883c7657
Commit
883c7657
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
cmake: use MSGPACK_LIB var
Change-Id: I0d1756a3150278a07b08d16e3dae988b782335de
parent
c8cd2c73
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+5
-3
5 additions, 3 deletions
CMakeLists.txt
with
5 additions
and
3 deletions
CMakeLists.txt
+
5
−
3
View file @
883c7657
...
...
@@ -17,9 +17,11 @@ set (VERSION ${CMAKE_PROJECT_VERSION})
find_package
(
PkgConfig REQUIRED
)
find_package
(
msgpack-cxx CONFIG
)
if
(
NOT msgpack-cxx_FOUND
)
if
(
msgpack-cxx_FOUND
)
set
(
MSGPACK_LIB msgpack-cxx
)
else
()
find_package
(
msgpackc-cxx CONFIG REQUIRED NAMES msgpackc-cxx msgpack
)
add_library
(
msgpack-cxx ALIAS
msgpackc-cxx
)
set
(
MSGPACK_LIB
msgpackc-cxx
)
endif
()
find_package
(
fmt
)
...
...
@@ -69,7 +71,7 @@ list (APPEND dhtnet_HEADERS
)
add_library
(
dhtnet
${
dhtnet_SOURCES
}
)
target_link_libraries
(
dhtnet PUBLIC PkgConfig::opendht PkgConfig::pjproject fmt::fmt
msgpack-cxx
)
target_link_libraries
(
dhtnet PUBLIC PkgConfig::opendht PkgConfig::pjproject fmt::fmt
${
MSGPACK_LIB
}
)
target_include_directories
(
dhtnet PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
$<INSTALL_INTERFACE:include>
...
...
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