Skip to content

Commit 52ad846

Browse files
mszabo-wikiameta-codesync[bot]
authored andcommitted
Find and link libsystemd (#9706)
Summary: libsystemd is a dependency since D89484998, so find it via pkg-config and link it in. Pull Request resolved: #9706 Reviewed By: paulbiss Differential Revision: D91287727 fbshipit-source-id: 2f3feda6ac1d9dff8df790d77997e513a61f37e8
1 parent f48ec5c commit 52ad846

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

CMake/Findsystemd.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
find_package(PkgConfig)
2+
pkg_check_modules(SYSTEMD libsystemd)
3+
4+
include(FindPackageHandleStandardArgs)
5+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
6+
systemd
7+
DEFAULT_MSG
8+
SYSTEMD_LIBRARIES
9+
SYSTEMD_INCLUDEDIR)
10+

CMake/HPHPFindLibs.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ if (APPLE)
272272
endif()
273273

274274
if (LINUX)
275+
find_package(systemd REQUIRED)
275276
find_package(Bpf REQUIRED)
276277
endif()
277278

@@ -337,7 +338,7 @@ macro(hphp_link target)
337338
target_link_libraries(${target} ${VISIBILITY} glog)
338339

339340
if (LINUX)
340-
target_link_libraries(${target} ${VISIBILITY} ${BPF_LIBRARIES})
341+
target_link_libraries(${target} ${VISIBILITY} ${BPF_LIBRARIES} ${SYSTEMD_LIBRARIES})
341342
endif()
342343

343344
if (LIBINOTIFY_LIBRARY)

ci/ubuntu-20.04-focal/debian/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Build-Depends:
5353
libsodium-dev,
5454
libsqlite3-dev,
5555
libssl-dev,
56+
libsystemd-dev,
5657
libtool,
5758
libxml2-dev,
5859
libxslt1-dev,

0 commit comments

Comments
 (0)