mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 20:25:28 +03:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
--- ./linux/rust.cmake.orig
|
|
+++ ./linux/rust.cmake
|
|
@@ -2,24 +2,21 @@
|
|
# many dependencies we would need to install Corrosion on the system.
|
|
# See instructions on https://github.com/AndrewGaspar/corrosion#cmake-install
|
|
# Once done, uncomment this line:
|
|
-# find_package(Corrosion REQUIRED)
|
|
+find_package(Corrosion REQUIRED)
|
|
|
|
-include(FetchContent)
|
|
+corrosion_import_crate(MANIFEST_PATH ../intiface-engine-flutter-bridge/Cargo.toml FROZEN)
|
|
|
|
-FetchContent_Declare(
|
|
- Corrosion
|
|
- GIT_REPOSITORY https://github.com/AndrewGaspar/corrosion.git
|
|
- GIT_TAG origin/master # Optionally specify a version tag or branch here
|
|
-)
|
|
-
|
|
-FetchContent_MakeAvailable(Corrosion)
|
|
-
|
|
-corrosion_import_crate(MANIFEST_PATH ../intiface-engine-flutter-bridge/Cargo.toml)
|
|
-
|
|
# Flutter-specific
|
|
|
|
set(CRATE_NAME "intiface_engine_flutter_bridge")
|
|
|
|
target_link_libraries(${BINARY_NAME} PRIVATE ${CRATE_NAME})
|
|
+
|
|
+# For some reason the flags are already there (probably from Corrosion),
|
|
+# but they're in wrong order, and linking fails. Link them harder to workaround.
|
|
+find_package(PkgConfig REQUIRED)
|
|
+pkg_check_modules(DBUS REQUIRED IMPORTED_TARGET dbus-1)
|
|
+pkg_check_modules(UDEV REQUIRED IMPORTED_TARGET libudev)
|
|
+target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::DBUS PkgConfig::UDEV)
|
|
|
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${CRATE_NAME}-shared>)
|
|
\ No newline at end of file
|