From 24e0202e3a0359017387ac742d3753b458c37fe7 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Wed, 10 Jun 2020 11:52:41 -0500 Subject: [PATCH] cmake: Make FindHIDAPI add include dirs to imported targets --- cmake/FindHIDAPI.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmake/FindHIDAPI.cmake b/cmake/FindHIDAPI.cmake index 3d0172878..2d4b3bca1 100644 --- a/cmake/FindHIDAPI.cmake +++ b/cmake/FindHIDAPI.cmake @@ -201,9 +201,9 @@ if(HIDAPI_FOUND) if(NOT TARGET HIDAPI::hidapi) add_library(HIDAPI::hidapi UNKNOWN IMPORTED) set_target_properties(HIDAPI::hidapi PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION ${HIDAPI_LIBRARY}) - set_property(TARGET HIDAPI::hidapi PROPERTY + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${HIDAPI_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${HIDAPI_INCLUDE_DIR}" IMPORTED_LINK_INTERFACE_LIBRARIES Threads::Threads) endif() endif() @@ -212,8 +212,8 @@ if(HIDAPI_libusb_FOUND AND NOT TARGET HIDAPI::hidapi-libusb) add_library(HIDAPI::hidapi-libusb UNKNOWN IMPORTED) set_target_properties(HIDAPI::hidapi-libusb PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION ${HIDAPI_LIBUSB_LIBRARY}) - set_property(TARGET HIDAPI::hidapi-libusb PROPERTY + IMPORTED_LOCATION "${HIDAPI_LIBUSB_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${HIDAPI_INCLUDE_DIR}" IMPORTED_LINK_INTERFACE_LIBRARIES Threads::Threads) endif() @@ -221,7 +221,7 @@ if(HIDAPI_hidraw_FOUND AND NOT TARGET HIDAPI::hidapi-hidraw) add_library(HIDAPI::hidapi-hidraw UNKNOWN IMPORTED) set_target_properties(HIDAPI::hidapi-hidraw PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION ${HIDAPI_HIDRAW_LIBRARY}) - set_property(TARGET HIDAPI::hidapi-hidraw PROPERTY + IMPORTED_LOCATION "${HIDAPI_HIDRAW_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${HIDAPI_INCLUDE_DIR}" IMPORTED_LINK_INTERFACE_LIBRARIES Threads::Threads) endif()