build: libraries to make rakurai v12 build
This commit is contained in:
1 parent
6b6f34288d
commit
6ccfbda5aa
1 file changed
+25
@@ -50,6 +50,31 @@ pkg_check_modules(
|
||||
IMPORTED_TARGET
|
||||
rakurai-dex-connector
|
||||
)
|
||||
# Rakurai's static dex SDK uses hidapi's libudev backend. Keep this explicit so
|
||||
# existing CMake build trees also pick up the dependency when the connector's
|
||||
# pkg-config metadata changes between package versions.
|
||||
find_library(RAKURAI_UDEV_LIBRARY NAMES udev libudev.so.1 REQUIRED)
|
||||
|
||||
# The Rakurai package currently publishes a bare `udev` dependency. Minimal
|
||||
# runtime images only contain libudev.so.1, so replace that entry with the
|
||||
# resolved library while preserving its position after Rakurai's static SDK.
|
||||
get_target_property(
|
||||
RAKURAI_LINK_LIBRARIES
|
||||
PkgConfig::rakurai-dex-connector-library
|
||||
INTERFACE_LINK_LIBRARIES
|
||||
)
|
||||
set(RAKURAI_RESOLVED_LINK_LIBRARIES)
|
||||
foreach(RAKURAI_LINK_LIBRARY IN LISTS RAKURAI_LINK_LIBRARIES)
|
||||
if(RAKURAI_LINK_LIBRARY STREQUAL "udev" OR RAKURAI_LINK_LIBRARY STREQUAL "-ludev")
|
||||
list(APPEND RAKURAI_RESOLVED_LINK_LIBRARIES ${RAKURAI_UDEV_LIBRARY})
|
||||
else()
|
||||
list(APPEND RAKURAI_RESOLVED_LINK_LIBRARIES ${RAKURAI_LINK_LIBRARY})
|
||||
endif()
|
||||
endforeach()
|
||||
set_property(
|
||||
TARGET PkgConfig::rakurai-dex-connector-library
|
||||
PROPERTY INTERFACE_LINK_LIBRARIES ${RAKURAI_RESOLVED_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
# include paths
|
||||
target_include_directories(
|
||||
|
||||
Reference in new issue
Block a user