vcpkg/ports/ecm/fix_libmount.patch
Dawid Wróbel a2fcb03749
[libmount] New port (#21491)
* [libmount] new port

* [libmount] update versions

* [kf5solid] add libmount feature

* [kf5solid] update versions

* [kf5kio] add libmount dependency

* [kf5kio] update versions

* [libmount] Remove libmount-dev from Linux CI image

* [glib] Add libmount feature

* [glib] update versions

* [ECM] fix linking against static LibMount

* [ECM] update versions

* [kf5solid] make libmount feature a default on Linux

* [kf5solid, kf5kio] update versions
2021-11-23 20:54:53 -08:00

24 lines
1.0 KiB
Diff

diff --git a/find-modules/FindLibMount.cmake b/find-modules/FindLibMount.cmake
index 3fcde4c5435a79c61c53bbd27e1932441a056d98..1f53f0218faa82fdf9713ab768080ab7c1d72b4a 100644
--- a/find-modules/FindLibMount.cmake
+++ b/find-modules/FindLibMount.cmake
@@ -30,7 +30,7 @@ Since 5.83.0
#]=======================================================================]
find_package(PkgConfig QUIET)
-pkg_check_modules(PC_LIBMOUNT QUIET mount)
+pkg_check_modules(PC_LIBMOUNT QUIET IMPORTED_TARGET mount)
find_path(LibMount_INCLUDE_DIRS NAMES libmount/libmount.h HINTS ${PC_LIBMOUNT_INCLUDE_DIRS})
find_library(LibMount_LIBRARIES NAMES mount HINTS ${PC_LIBMOUNT_LIBRARY_DIRS})
@@ -62,6 +62,9 @@ if(LibMount_FOUND AND NOT TARGET LibMount::LibMount)
INTERFACE_INCLUDE_DIRECTORIES "${LibMount_INCLUDE_DIRS}"
INTERFACE_COMPILE_DEFINITIONS "${PC_LIBMOUNT_CFLAGS_OTHER}"
)
+ if (TARGET PkgConfig::PC_LIBMOUNT)
+ target_link_libraries(LibMount::LibMount INTERFACE PkgConfig::PC_LIBMOUNT)
+ endif()
endif()
include(FeatureSummary)