diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 01:19:35 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 01:19:35 +0200 |
commit | 6976edc4c5f6dde907c29263b6a23e58cc30d767 (patch) | |
tree | 8c57c4fde83cdc37e12a5d3377d2eb03d4d28c6c | |
parent | 5c156a7a968ca98bc6ddeb7f4d44a573f0223c94 (diff) | |
parent | 2f582bda46e84dff415b67dd376a06612afda815 (diff) | |
download | libayatana-common-6976edc4c5f6dde907c29263b6a23e58cc30d767.tar.gz libayatana-common-6976edc4c5f6dde907c29263b6a23e58cc30d767.tar.bz2 libayatana-common-6976edc4c5f6dde907c29263b6a23e58cc30d767.zip |
Merge branch 'tari01-pr/fix-gir-error'
Attributes GH PR #42: https://github.com/AyatanaIndicators/libayatana-common/pull/42
-rw-r--r-- | src/CMakeLists.txt | 87 |
1 files changed, 44 insertions, 43 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dfebdf5..3e4d529 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,58 +31,59 @@ install(TARGETS ayatana-common DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) # AyatanaCommon.gir if (INTROSPECTION_FOUND) - add_custom_command( - 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-0.0.gir" - ) - - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0") + add_custom_command( + 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 + --no-libtool + --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-0.0.gir" + ) + + 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" - ) + 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") + 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-0.0.typelib" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND - ${VAPI_GEN} - --library=AyatanaCommon - AyatanaCommon-0.0.gir - ) + if (VALA_COMPILER) + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon-0.0.typelib" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${VAPI_GEN} + --library=AyatanaCommon + AyatanaCommon-0.0.gir + ) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/vala/vapi") + 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") + add_custom_target("src" ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaCommon.vapi") - endif() + endif() endif() |