diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-28 23:32:38 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-28 23:32:38 +0200 |
commit | 1669b29b16411fb7ee1d4b012cc8775338a590c2 (patch) | |
tree | e9bd54c154441fc01cc40d07dafc1b6ebd85be7a /src | |
parent | f3ac7d608633d0f2bad0505c1ed1c25af6048745 (diff) | |
parent | 908b36b944787b19cc9cffaf71aca5cf292be7b9 (diff) | |
download | libayatana-common-1669b29b16411fb7ee1d4b012cc8775338a590c2.tar.gz libayatana-common-1669b29b16411fb7ee1d4b012cc8775338a590c2.tar.bz2 libayatana-common-1669b29b16411fb7ee1d4b012cc8775338a590c2.zip |
Merge branch 'sunweaver-pr/generate-typelib-file'
Attributes GH PR #41: https://github.com/AyatanaIndicators/libayatana-common/pull/41
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 39682a7..dfebdf5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,35 +32,51 @@ install(TARGETS ayatana-common DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) if (INTROSPECTION_FOUND) add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.gir" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir" DEPENDS "ayatana-common" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${INTROSPECTION_SCANNER} utils.c utils.h --namespace=AyatanaCommon + --nsversion=0.0 --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" + --output "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir" ) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0") + +# AyatanaCommon.typelib + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.typelib" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${INTROSPECTION_COMPILER} + --includedir=${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir + -o "${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 if (VALA_COMPILER) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.gir" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.typelib" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${VAPI_GEN} --library=AyatanaCommon - AyatanaCommon.gir + AyatanaCommon-0.0.gir ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/vala/vapi") |