Skip to content

Commit b60561b

Browse files
committed
ci: try adding DBus CMake file
1 parent e731bba commit b60561b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
build-docker:
1212
runs-on: ubuntu-latest
13+
env:
14+
DBus1_ROOT: ${{ github.workspace }}/cmake
1315
strategy:
1416
matrix:
1517
build:
@@ -19,7 +21,7 @@ jobs:
1921
image: ${{ matrix.build.image }}
2022
options: --user root
2123
env:
22-
DBus1_ROOT: /usr/lib/aarch64-linux-gnu/cmake/DBus1
24+
DBus1_ROOT: ${{ github.workspace }}/cmake
2325
steps:
2426
- name: Checkout repository
2527
uses: actions/checkout@v3

cmake/FindDBus1.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
message("FOUND DBUS")
2+
3+
set(DBus1_LIBRARY "/usr/lib/x86_64-linux-gnu/libdbus-1.so" CACHE STRING "DBus library")
4+
set(DBus1_LIBRARIES "${DBus1_LIBRARY}" CACHE STRING "DBus libraries")
5+
set(DBus1_INCLUDE_DIR "/usr/include/dbus-1.0" CACHE STRING "DBus include dir")
6+
set(DBus1_ARCH_INCLUDE_DIR "/usr/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/dbus-1.0/include" CACHE STRING "DBus arch include dir")
7+
8+
add_library(dbus-1 SHARED IMPORTED)
9+
set_property(TARGET dbus-1 PROPERTY IMPORTED_LOCATION ${DBus1_LIBRARY})
10+
set_property(TARGET dbus-1 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${DBus1_INCLUDE_DIRS})
11+
set_property(TARGET dbus-1 PROPERTY INTERFACE_COMPILE_DEFINITIONS ${DBus1_DEFINITIONS})

0 commit comments

Comments
 (0)