24 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Diff
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Diff
		
	
	
		
			Executable File
		
	
	
	
	
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)
 |