Closed z3ntu closed 2 years ago
This patch helps (vala bindings probably also need this but I'm not building them (yet))
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3e4d529..5763d91 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -50,6 +50,8 @@ if (INTROSPECTION_FOUND)
--output "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir"
)
+ add_custom_target(AyatanaCommon-0.0.gir ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir")
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
# AyatanaCommon.typelib
@@ -65,6 +67,8 @@ if (INTROSPECTION_FOUND)
-o "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.typelib"
)
+ add_custom_target(AyatanaCommon-0.0.typelib ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.typelib")
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.typelib" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0")
# AyatanaCommon.vapi
From what I could piece together online, add_custom_command
itself doesn't really do anything and you have to use it with something else, e.g. add_custom_target
which actually puts it into the Makefile.
No clue how this works for you on other distros.
edit: vala bindings are actually fine, they get added to a target here https://github.com/AyatanaIndicators/libayatana-common/blob/main/src/CMakeLists.txt#L85
Yes, I originally made gobject-introspection
and vala
hard dependencies. As thinks changed over time, we got a situation where the gir + typelib stuff does not get built if there is no vala to depend on those targets.
Can I ask you to check out https://github.com/AyatanaIndicators/libayatana-common/pull/54 and tell me if this fixes the issue?
Thanks.
@z3ntu: any feedback on #54?
@z3ntu: any feedback on #54?
There is feedback in https://github.com/AyatanaIndicators/libayatana-common/pull/54 itself.
I get this when building with
gobject-introspection-1.0
available in the make install phase. Grepping through the build directory I cannot find traces of theadd_custom_command
stuff from https://github.com/AyatanaIndicators/libayatana-common/blob/main/src/CMakeLists.txt#L34cmake version 3.21.3 if that matters