diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-26 07:33:21 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-26 07:33:21 +0200 |
commit | b32fac907b6e61f0f94d28d0e44d77bf0883c8e2 (patch) | |
tree | c32ed6a4be5b03d5e5bccd8f7c510cac278a8854 /src/CMakeLists.txt | |
parent | 7f9519e1b54d4e864f2573583945419ef56f8a05 (diff) | |
parent | c7320dab38cb2dda29226eab2c8705b5a132ac87 (diff) | |
download | libayatana-common-b32fac907b6e61f0f94d28d0e44d77bf0883c8e2.tar.gz libayatana-common-b32fac907b6e61f0f94d28d0e44d77bf0883c8e2.tar.bz2 libayatana-common-b32fac907b6e61f0f94d28d0e44d77bf0883c8e2.zip |
Merge branch 'tari01-pr/add-vala-bindings'
Attributes GH PR #35: https://github.com/AyatanaIndicators/libayatana-common/pull/35
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0189cc1..637ce9f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,3 +27,44 @@ configure_file(libayatana-common.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libayatana-co install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libayatana-common.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig) install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/ayatana/common) install(TARGETS ayatana-common DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) + +# AyatanaCommon.gir + +find_package(GObjectIntrospection REQUIRED QUIET) + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.gir" + DEPENDS "ayatana-common" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND + ${INTROSPECTION_SCANNER} + utils.c utils.h + --namespace=AyatanaCommon + --c-include=ayatana/common/utils.h + --quiet + --warn-all + --include=GLib-2.0 + --library="ayatana-common" + --library-path=${CMAKE_CURRENT_BINARY_DIR} + --output "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.gir" +) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0") + +# AyatanaCommon.vapi + +find_package(Vala REQUIRED QUIET) + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.gir" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${VAPI_GEN} + --library=AyatanaCommon + AyatanaCommon.gir +) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/vala/vapi") + +add_custom_target("src" ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi") |