Exit early if UDev::UDev target already exists

This prevents a potential error where two projects in a larger
build graph depend on UDev and both attempt to create the same
target.
This commit is contained in:
Chris Thrasher 2025-02-18 11:48:11 -07:00
parent 8c9ffe972f
commit a7167c8603
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C

View File

@ -9,6 +9,10 @@
# Redistribution and use of this file is allowed according to the terms of the BSD license. # Redistribution and use of this file is allowed according to the terms of the BSD license.
# #
if(TARGET UDev::UDev)
return()
endif()
find_path( find_path(
UDEV_INCLUDE_DIR UDEV_INCLUDE_DIR
libudev.h libudev.h