From c72376856260360074879a5c91217c66c934558d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 23 Oct 2021 03:00:53 +0200 Subject: Re-introduce (CMake based) build support against GTK+ 2.0. --- CMakeLists.txt | 31 ++- bindings/CMakeLists.txt | 4 +- bindings/mono/ApplicationIndicatorCustom.cs | 40 --- bindings/mono/ApplicationIndicatorCustom.cs.in | 40 +++ bindings/mono/CMakeLists.txt | 279 ++++++++++++++------- bindings/mono/app-indicator.sources.xml.in | 4 +- bindings/mono/ayatana-appindicator-sharp-0.1.pc.in | 12 + .../mono/ayatana-appindicator-sharp.dll.config | 7 + bindings/mono/ayatana-appindicator-sharp.snk | Bin 0 -> 596 bytes bindings/mono/examples/CMakeLists.txt | 33 ++- bindings/mono/libayatana-appindicator-api.metadata | 66 +++++ ...policy.0.0.ayatana-appindicator-sharp.config.in | 10 + ...policy.0.1.ayatana-appindicator-sharp.config.in | 10 + docs/reference/CMakeLists.txt | 9 +- docs/reference/scangobj.sh.in | 2 +- example/CMakeLists.txt | 67 +++-- src/AyatanaAppIndicator-0.1.metadata | 3 + src/CMakeLists.txt | 75 +++--- src/ayatana-appindicator-0.1.pc.in | 2 +- tests/CMakeLists.txt | 38 +-- 20 files changed, 502 insertions(+), 230 deletions(-) delete mode 100644 bindings/mono/ApplicationIndicatorCustom.cs create mode 100644 bindings/mono/ApplicationIndicatorCustom.cs.in create mode 100644 bindings/mono/ayatana-appindicator-sharp-0.1.pc.in create mode 100644 bindings/mono/ayatana-appindicator-sharp.dll.config create mode 100644 bindings/mono/ayatana-appindicator-sharp.snk create mode 100644 bindings/mono/libayatana-appindicator-api.metadata create mode 100644 bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in create mode 100644 bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in create mode 100644 src/AyatanaAppIndicator-0.1.metadata diff --git a/CMakeLists.txt b/CMakeLists.txt index f1e441e..232af6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,34 @@ endif() # Check for prerequisites -set(DEPS glib-2.0>=2.58 ayatana-indicator3-0.4>=0.8.4 gtk+-3.0>=3.24 dbusmenu-gtk3-0.4) +option(FLAVOUR_GTK2 "Build against GTK+-2.0" OFF) +option(FLAVOUR_GTK3 "Build against GTK+-3.0" ON) + +if (FLAVOUR_GTK2) + set (FLAVOUR_GTK3 OFF) +endif() +if (FLAVOUR_GTK3) + set (FLAVOUR_GTK2 OFF) +endif() + +set(DEPS glib-2.0>=2.58) + +if (FLAVOUR_GTK3) + set(DEPS + ${DEPS} + ayatana-indicator3-0.4>=0.8.4 + gtk+-3.0>=3.24 + dbusmenu-gtk3-0.4 + ) +elseif (FLAVOUR_GTK2) + set(DEPS + ${DEPS} + ayatana-indicator-0.4>=0.8.4 + gtk+-2.0>=2.18 + dbusmenu-gtk-0.4 + ) +endif() + if(ENABLE_TESTS) set(DEPS ${DEPS} dbus-1>=1.12 dbus-glib-1>=0.82) @@ -82,6 +109,8 @@ endif() # Display config info message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") +message(STATUS "GTK+-3.0 build: ${FLAVOUR_GTK3}") +message(STATUS "GTK+-2.0 build: ${FLAVOUR_GTK2}") message(STATUS "Unit tests: ${ENABLE_TESTS}") message(STATUS "Build with -Werror: ${ENABLE_WERROR}") message(STATUS "API Documentation: ${ENABLE_GTKDOC}") diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt index b4fa5de..402bcc4 100644 --- a/bindings/CMakeLists.txt +++ b/bindings/CMakeLists.txt @@ -1,2 +1,4 @@ -add_subdirectory(vala) +if (FLAVOUR_GTK3) + add_subdirectory(vala) +endif() add_subdirectory(mono) diff --git a/bindings/mono/ApplicationIndicatorCustom.cs b/bindings/mono/ApplicationIndicatorCustom.cs deleted file mode 100644 index 7e4b24c..0000000 --- a/bindings/mono/ApplicationIndicatorCustom.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace AyatanaAppIndicator -{ - public partial class ApplicationIndicator : GLib.Object - { - [DllImport ("ayatana-appindicator3.dll")] - static extern int app_indicator_get_status (IntPtr i); - - [DllImport ("ayatana-appindicator3.dll")] - static extern int app_indicator_get_category (IntPtr i); - - [DllImport ("ayatana-appindicator3.dll")] - static extern void app_indicator_set_status (IntPtr i, int s); - - [GLib.Property ("status")] - public AppIndicatorStatus AppIndicatorStatus - { - get - { - return (AppIndicatorStatus) app_indicator_get_status (Handle); - } - - set - { - app_indicator_set_status (Handle, (int) value); - } - } - - [GLib.Property ("category")] - public AppIndicatorCategory AppIndicatorCategory - { - get - { - return (AppIndicatorCategory) app_indicator_get_category (Handle); - } - } - } -} diff --git a/bindings/mono/ApplicationIndicatorCustom.cs.in b/bindings/mono/ApplicationIndicatorCustom.cs.in new file mode 100644 index 0000000..426e930 --- /dev/null +++ b/bindings/mono/ApplicationIndicatorCustom.cs.in @@ -0,0 +1,40 @@ +using System; +using System.Runtime.InteropServices; + +namespace AyatanaAppIndicator +{ + public partial class ApplicationIndicator : GLib.Object + { + [DllImport ("@ayatana_appindicator_gtkver@.dll")] + static extern int app_indicator_get_status (IntPtr i); + + [DllImport ("@ayatana_appindicator_gtkver@.dll")] + static extern int app_indicator_get_category (IntPtr i); + + [DllImport ("@ayatana_appindicator_gtkver@.dll")] + static extern void app_indicator_set_status (IntPtr i, int s); + + [GLib.Property ("status")] + public AppIndicatorStatus AppIndicatorStatus + { + get + { + return (AppIndicatorStatus) app_indicator_get_status (Handle); + } + + set + { + app_indicator_set_status (Handle, (int) value); + } + } + + [GLib.Property ("category")] + public AppIndicatorCategory AppIndicatorCategory + { + get + { + return (AppIndicatorCategory) app_indicator_get_category (Handle); + } + } + } +} diff --git a/bindings/mono/CMakeLists.txt b/bindings/mono/CMakeLists.txt index 762aa0b..6fada54 100644 --- a/bindings/mono/CMakeLists.txt +++ b/bindings/mono/CMakeLists.txt @@ -1,56 +1,70 @@ -# ayatana-appindicator3-sharp-0.1.pc +if (FLAVOUR_GTK3) + set (ayatana_appindicator_gtkver "ayatana-appindicator3") +elseif (FLAVOUR_GTK2) + set (ayatana_appindicator_gtkver "ayatana-appindicator") +endif() + +# ayatana-appindicator{,3}-sharp-0.1.pc -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-appindicator3-sharp-0.1.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-sharp-0.1.pc" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-sharp-0.1.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-sharp-0.1.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp-0.1.pc" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp-0.1.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") -# ayatana-appindicator3-sharp.dll.config +# ayatana-appindicator{,3}-sharp.dll.config -file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/ayatana-appindicator3-sharp.dll.config" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ayatana-appindicator3-sharp.dll.config" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/ayatana-appindicator3-sharp-0.1") +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-sharp.dll.config" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-sharp.dll.config" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/${ayatana_appindicator_gtkver}-sharp-0.1") -# app-indicator.sources.xml +# app-indicator-gtk{2,3}.sources.xml file(RELATIVE_PATH REL_BIN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}) file(RELATIVE_PATH REL_SRC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/app-indicator.sources.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/app-indicator.sources.xml" @ONLY) -# libayatana-appindicator3-api.raw +# libayatana-appindicator{,3}-api.raw -find_program(GAPI3_PARSER gapi3-parser) +if (FLAVOUR_GTK3) + find_program(GAPI_PARSER gapi3-parser) +elseif (FLAVOUR_GTK2) + find_program(GAPI_PARSER gapi2-parser) +endif() add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.raw" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.raw" DEPENDS "src" "${CMAKE_CURRENT_BINARY_DIR}/app-indicator.sources.xml" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND - ${GAPI3_PARSER} + ${GAPI_PARSER} "${CMAKE_CURRENT_BINARY_DIR}/app-indicator.sources.xml" ) -# libayatana-appindicator3-api.middle +# libayatana-appindicator{,3}-api.middle -find_program(GAPI3_FIXUP gapi3-fixup) +if (FLAVOUR_GTK3) + find_program(GAPI_FIXUP gapi3-fixup) +elseif (FLAVOUR_GTK2) + find_program(GAPI_FIXUP gapi2-fixup) +endif() add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.middle" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.raw" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.middle" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.raw" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E copy - "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.raw" - "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.middle" + "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.raw" + "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.middle" COMMAND - ${GAPI3_FIXUP} - --api=libayatana-appindicator3-api.middle - --metadata="${CMAKE_CURRENT_SOURCE_DIR}/libayatana-appindicator3-api.metadata" + ${GAPI_FIXUP} + --api=lib${ayatana_appindicator_gtkver}-api.middle + --metadata="${CMAKE_CURRENT_SOURCE_DIR}/lib${ayatana_appindicator_gtkver}-api.metadata" ) -# libayatana-appindicator3-api.xml +# libayatana-appindicator{,3}-api.xml add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.xml" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.middle" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.xml" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.middle" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} VERBATIM COMMAND @@ -77,7 +91,7 @@ add_custom_command( -e "s|PROP_DBUS_MENU_SERVER_S|dbus-menu-server|" -e "s|PROP_TITLE_S|Title|" -e "s|PROP_TITLE_S|title|" - "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.middle" > "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.xml" + "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.middle" > "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.xml" ) # AppIndicatorCategory.cs @@ -92,111 +106,182 @@ add_custom_command( # ConnectionChangedHandler.cs # NewLabelHandler.cs -pkg_check_modules(GTK_SHARP_3_0 REQUIRED gtk-sharp-3.0>=2.99) -string(REPLACE ":" ";-I:" GTK_SHARP_3_0_INCLUDE_DIRS ${GTK_SHARP_3_0_INCLUDE_DIRS}) -find_program(GAPI3_CODEGEN gapi3-codegen) - -add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/GtkSharp/ObjectManager.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorCategory.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewAttentionIconHandler.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewStatusHandler.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorStatus.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconHandler.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconThemePathHandler.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ScrollEventHandler.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ConnectionChangedHandler.cs" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewLabelHandler.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3-api.xml" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND - ${GAPI3_CODEGEN} - --generate libayatana-appindicator3-api.xml - --outdir=${CMAKE_CURRENT_BINARY_DIR} - --assembly-name=ayatana-appindicator3-sharp - ${GTK_SHARP_3_0_INCLUDE_DIRS} -) +if (FLAVOUR_GTK3) + pkg_check_modules(GTK_SHARP_3_0 REQUIRED gtk-sharp-3.0>=2.99) + string(REPLACE ":" ";-I:" GTK_SHARP_3_0_INCLUDE_DIRS ${GTK_SHARP_3_0_INCLUDE_DIRS}) + find_program(GAPI3_CODEGEN gapi3-codegen) + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/GtkSharp/ObjectManager.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorCategory.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewAttentionIconHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewStatusHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorStatus.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs.raw" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconThemePathHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ScrollEventHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ConnectionChangedHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewLabelHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.xml" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${GAPI3_CODEGEN} + --generate lib${ayatana_appindicator_gtkver}-api.xml + --outdir=${CMAKE_CURRENT_BINARY_DIR} + --assembly-name=${ayatana_appindicator_gtkver}-sharp + ${GTK_SHARP_3_0_INCLUDE_DIRS} + ) +elseif (FLAVOUR_GTK2) + pkg_check_modules(GTK_SHARP_2_0 REQUIRED gtk-sharp-2.0>=2.12) + string(REPLACE ":" ";-I:" GTK_SHARP_2_0_INCLUDE_DIRS ${GTK_SHARP_2_0_INCLUDE_DIRS}) + find_program(GAPI2_CODEGEN gapi2-codegen) + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ObjectManager.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorCategory.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewAttentionIconHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewStatusHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorStatus.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs.raw" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconThemePathHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ScrollEventHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ConnectionChangedHandler.cs" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewLabelHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}-api.xml" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${GAPI2_CODEGEN} + --generate lib${ayatana_appindicator_gtkver}-api.xml + --outdir=${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator + --assembly-name=${ayatana_appindicator_gtkver}-sharp + ${GTK_SHARP_2_0_INCLUDE_DIRS} + && + mv + "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs" + "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs.raw" + ) + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs.raw" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + VERBATIM + COMMAND + sed + -e "s|public class ApplicationIndicator|public partial class ApplicationIndicator|" + "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs.raw" > "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs" + ) +endif() -# ayatana-appindicator3-sharp.dll +# ayatana-appindicator{,3}-sharp.dll pkg_check_modules(MONO REQUIRED mono>=5.18) find_program(MCS mcs) -add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-sharp.dll" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/GtkSharp/ObjectManager.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorCategory.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewAttentionIconHandler.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewStatusHandler.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorStatus.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconHandler.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconThemePathHandler.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ScrollEventHandler.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ConnectionChangedHandler.cs" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewLabelHandler.cs" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND - ${MCS} - -keyfile:"${CMAKE_CURRENT_SOURCE_DIR}/ayatana-appindicator3-sharp.snk" - -nowarn:0169,0612,0618 - -unsafe - -out:"${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-sharp.dll" - -target:library - ${GTK_SHARP_3_0_LDFLAGS} "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/*.cs" "${CMAKE_CURRENT_BINARY_DIR}/GtkSharp/ObjectManager.cs" "${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cs" "${CMAKE_CURRENT_SOURCE_DIR}/ApplicationIndicatorCustom.cs" -) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ApplicationIndicatorCustom.cs.in" "${CMAKE_CURRENT_BINARY_DIR}/ApplicationIndicatorCustom.cs" @ONLY) + +if (FLAVOUR_GTK3) + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp.dll" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/GtkSharp/ObjectManager.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorCategory.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewAttentionIconHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewStatusHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorStatus.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconThemePathHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ScrollEventHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ConnectionChangedHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewLabelHandler.cs" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${MCS} + -keyfile:"${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-sharp.snk" + -nowarn:0169,0612,0618 + -unsafe + -out:"${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp.dll" + -target:library + ${GTK_SHARP_3_0_LDFLAGS} "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/*.cs" "${CMAKE_CURRENT_BINARY_DIR}/GtkSharp/ObjectManager.cs" "${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cs" "${CMAKE_CURRENT_BINARY_DIR}/ApplicationIndicatorCustom.cs" + ) +elseif (FLAVOUR_GTK2) + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp.dll" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ObjectManager.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorCategory.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewAttentionIconHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewStatusHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/AppIndicatorStatus.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ApplicationIndicator.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewIconThemePathHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ScrollEventHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/ConnectionChangedHandler.cs" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/NewLabelHandler.cs" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${MCS} + -keyfile:"${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-sharp.snk" + -nowarn:0169,0612,0618 + -unsafe + -out:"${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp.dll" + -target:library + ${GTK_SHARP_2_0_LDFLAGS} "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator/*.cs" "${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cs" "${CMAKE_CURRENT_BINARY_DIR}/ApplicationIndicatorCustom.cs" + ) +endif() find_program(GACUTIL gacutil) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-sharp.dll" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/ayatana-appindicator3-sharp-0.1") -install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${GACUTIL} -i ${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-sharp.dll -package ayatana-appindicator3-sharp -root ${CMAKE_INSTALL_FULL_LIBDIR})") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp.dll" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/${ayatana_appindicator_gtkver}-sharp-0.1") +install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${GACUTIL} -i ${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp.dll -package ${ayatana_appindicator_gtkver}-sharp -root ${CMAKE_INSTALL_FULL_LIBDIR})") -# policy.0.0.ayatana-appindicator3-sharp.config +# policy.0.0.ayatana-appindicator{,3}-sharp.config -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/policy.0.0.ayatana-appindicator3-sharp.config.in" "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.config" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.config" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/ayatana-appindicator3-sharp-0.1") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.config.in" "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.config" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.config" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/${ayatana_appindicator_gtkver}-sharp-0.1") -# policy.0.0.ayatana-appindicator3-sharp.dll +# policy.0.0.ayatana-appindicator{,3}-sharp.dll find_program(AL al) add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.dll" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-sharp.dll" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.dll" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-sharp.dll" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${AL} - -link:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.config" - -out:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.dll" - -keyfile:"${CMAKE_CURRENT_SOURCE_DIR}/ayatana-appindicator3-sharp.snk" + -link:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.config" + -out:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.dll" + -keyfile:"${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-sharp.snk" ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.dll" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/ayatana-appindicator3-sharp-0.1") -install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${GACUTIL} -i ${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.dll -package ayatana-appindicator3-sharp -root ${CMAKE_INSTALL_FULL_LIBDIR})") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.dll" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/${ayatana_appindicator_gtkver}-sharp-0.1") +install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${GACUTIL} -i ${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.dll -package ${ayatana_appindicator_gtkver}-sharp -root ${CMAKE_INSTALL_FULL_LIBDIR})") -# policy.0.1.ayatana-appindicator3-sharp.config +# policy.0.1.ayatana-appindicator{,3}-sharp.config -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/policy.0.1.ayatana-appindicator3-sharp.config.in" "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.ayatana-appindicator3-sharp.config" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.ayatana-appindicator3-sharp.config" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/ayatana-appindicator3-sharp-0.1") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/policy.0.1.${ayatana_appindicator_gtkver}-sharp.config.in" "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.${ayatana_appindicator_gtkver}-sharp.config" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.${ayatana_appindicator_gtkver}-sharp.config" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/${ayatana_appindicator_gtkver}-sharp-0.1") -# policy.0.1.ayatana-appindicator3-sharp.dll +# policy.0.1.ayatana-appindicator{,3}-sharp.dll find_program(AL al) add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.ayatana-appindicator3-sharp.dll" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.ayatana-appindicator3-sharp.dll" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.${ayatana_appindicator_gtkver}-sharp.dll" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/policy.0.0.${ayatana_appindicator_gtkver}-sharp.dll" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${AL} - -link:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.ayatana-appindicator3-sharp.config" - -out:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.ayatana-appindicator3-sharp.dll" - -keyfile:"${CMAKE_CURRENT_SOURCE_DIR}/ayatana-appindicator3-sharp.snk" + -link:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.${ayatana_appindicator_gtkver}-sharp.config" + -out:"${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.${ayatana_appindicator_gtkver}-sharp.dll" + -keyfile:"${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-sharp.snk" ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.ayatana-appindicator3-sharp.dll" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/ayatana-appindicator3-sharp-0.1") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/policy.0.1.${ayatana_appindicator_gtkver}-sharp.dll" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/cli/${ayatana_appindicator_gtkver}-sharp-0.1") -add_custom_target("bindings-mono" ALL DEPENDS "policy.0.1.ayatana-appindicator3-sharp.dll") +add_custom_target("bindings-mono" ALL DEPENDS "policy.0.1.${ayatana_appindicator_gtkver}-sharp.dll") if (ENABLE_TESTS) add_subdirectory(examples) diff --git a/bindings/mono/app-indicator.sources.xml.in b/bindings/mono/app-indicator.sources.xml.in index c8b7d52..4e28f9a 100644 --- a/bindings/mono/app-indicator.sources.xml.in +++ b/bindings/mono/app-indicator.sources.xml.in @@ -1,6 +1,6 @@ - - + + @REL_SRC@src/app-indicator.c @REL_BIN@src/app-indicator-enum-types.c diff --git a/bindings/mono/ayatana-appindicator-sharp-0.1.pc.in b/bindings/mono/ayatana-appindicator-sharp-0.1.pc.in new file mode 100644 index 0000000..3e1e3cb --- /dev/null +++ b/bindings/mono/ayatana-appindicator-sharp-0.1.pc.in @@ -0,0 +1,12 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +assemblies_dir=@CMAKE_INSTALL_FULL_LIBDIR@/cli/ayatana-appindicator-sharp-0.1 + +Name: ayatana-appindicator-sharp +Description: application indicators for .NET (GTK-2+ variant) +Version: @PROJECT_VERSION@ +Libraries: ${assemblies_dir}/ayatana-appindicator-sharp.dll ${assemblies_dir}/ayatana-appindicator-sharp.dll.config +Requires: gtk-sharp-2.0 +Cflags: +Libs: -r:${assemblies_dir}/ayatana-appindicator-sharp.dll diff --git a/bindings/mono/ayatana-appindicator-sharp.dll.config b/bindings/mono/ayatana-appindicator-sharp.dll.config new file mode 100644 index 0000000..c45f213 --- /dev/null +++ b/bindings/mono/ayatana-appindicator-sharp.dll.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/bindings/mono/ayatana-appindicator-sharp.snk b/bindings/mono/ayatana-appindicator-sharp.snk new file mode 100644 index 0000000..efb62d0 Binary files /dev/null and b/bindings/mono/ayatana-appindicator-sharp.snk differ diff --git a/bindings/mono/examples/CMakeLists.txt b/bindings/mono/examples/CMakeLists.txt index dd9e630..491de7e 100644 --- a/bindings/mono/examples/CMakeLists.txt +++ b/bindings/mono/examples/CMakeLists.txt @@ -6,15 +6,28 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator-example.in" "${CMA find_program(MONO mono) -add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIndicatorExample.exe" - DEPENDS "bindings-mono" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND - ${MCS} - -out:"${CMAKE_CURRENT_BINARY_DIR}/AyatanaIndicatorExample.exe" - -target:exe - ${GTK_SHARP_3_0_LDFLAGS} "-r:${CMAKE_BINARY_DIR}/bindings/mono/ayatana-appindicator3-sharp.dll" "${CMAKE_CURRENT_SOURCE_DIR}/AyatanaIndicatorExample.cs" -) +if (FLAVOUR_GTK3) + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIndicatorExample.exe" + DEPENDS "bindings-mono" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${MCS} + -out:"${CMAKE_CURRENT_BINARY_DIR}/AyatanaIndicatorExample.exe" + -target:exe + ${GTK_SHARP_3_0_LDFLAGS} "-r:${CMAKE_BINARY_DIR}/bindings/mono/ayatana-appindicator3-sharp.dll" "${CMAKE_CURRENT_SOURCE_DIR}/AyatanaIndicatorExample.cs" + ) +elseif (FLAVOUR_GTK2) + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaIndicatorExample.exe" + DEPENDS "bindings-mono" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND + ${MCS} + -out:"${CMAKE_CURRENT_BINARY_DIR}/AyatanaIndicatorExample.exe" + -target:exe + ${GTK_SHARP_2_0_LDFLAGS} "-r:${CMAKE_BINARY_DIR}/bindings/mono/ayatana-appindicator-sharp.dll" "${CMAKE_CURRENT_SOURCE_DIR}/AyatanaIndicatorExample.cs" + ) +endif() add_custom_target("bindings-mono-examples" ALL DEPENDS "AyatanaIndicatorExample.exe") diff --git a/bindings/mono/libayatana-appindicator-api.metadata b/bindings/mono/libayatana-appindicator-api.metadata new file mode 100644 index 0000000..e610c88 --- /dev/null +++ b/bindings/mono/libayatana-appindicator-api.metadata @@ -0,0 +1,66 @@ + + + ApplicationIndicator + NewAttentionIcon + new-attention-icon + NewStatus + new-status + NewLabel + new-label + NewAccessibleDesc + new-accessible-desc + ConnectionChanged + connection-changed + ScrollEvent + scroll-event + NewIcon + new-icon + NewIconThemePath + new-icon-theme-path + ID + true + true + IconName + AttentionIconName + IconThemePath + Menu + GtkMenu* + Connected + Label + LabelGuide + AccessibleDesc + OrderingIndex + SetMenu + + id + icon-name + category + id + icon-name + category + icon-theme-path + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in b/bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in new file mode 100644 index 0000000..0801da0 --- /dev/null +++ b/bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in b/bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in new file mode 100644 index 0000000..f5a082d --- /dev/null +++ b/bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/reference/CMakeLists.txt b/docs/reference/CMakeLists.txt index 6ae064a..487d9a1 100644 --- a/docs/reference/CMakeLists.txt +++ b/docs/reference/CMakeLists.txt @@ -1,3 +1,8 @@ +if (FLAVOUR_GTK3) + set (ayatana_appindicator_gtkver "ayatana-appindicator3") +elseif (FLAVOUR_GTK2) + set (ayatana_appindicator_gtkver "ayatana-appindicator") +endif() # libayatana-appindicator-docs.sgml @@ -50,6 +55,8 @@ add_custom_command( list(JOIN PROJECT_DEPS_INCLUDE_DIRS " -I" GTKDOC_SCANGOBJ_INCLUDE_DIRS) list(JOIN PROJECT_DEPS_LIBRARIES " -l" GTKDOC_SCANGOBJ_LIBRARIES) +set (SCANGOBJ_AYATANA_APPINDICATOR "${ayatana_appindicator_gtkver}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scangobj.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/scangobj.sh") # libayatana-appindicator.actions @@ -228,6 +235,6 @@ add_custom_command( ) set_source_files_properties("fixxref" PROPERTIES SYMBOLIC True) -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gtk-doc/html/libayatana-appindicator") +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gtk-doc/html/lib${ayatana_appindicator_gtkver}") add_custom_target("docs-references" ALL DEPENDS "fixxref") diff --git a/docs/reference/scangobj.sh.in b/docs/reference/scangobj.sh.in index 0272865..8cb2500 100644 --- a/docs/reference/scangobj.sh.in +++ b/docs/reference/scangobj.sh.in @@ -1 +1 @@ -LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${CMAKE_BINARY_DIR}/src" CFLAGS="-I${GTKDOC_SCANGOBJ_INCLUDE_DIRS}" LDFLAGS="-l${GTKDOC_SCANGOBJ_LIBRARIES} -L${CMAKE_BINARY_DIR}/src -layatana-appindicator3" gtkdoc-scangobj --type-init-func="g_type_init()" --module=libayatana-appindicator > /dev/null +LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${CMAKE_BINARY_DIR}/src" CFLAGS="-I${GTKDOC_SCANGOBJ_INCLUDE_DIRS}" LDFLAGS="-l${GTKDOC_SCANGOBJ_LIBRARIES} -L${CMAKE_BINARY_DIR}/src -l${SCANGOBJ_AYATANA_APPINDICATOR}" gtkdoc-scangobj --type-init-func="g_type_init()" --module=libayatana-appindicator > /dev/null diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index ba8839e..3a6cd53 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,30 +1,43 @@ +if (FLAVOUR_GTK3) + set (ayatana_appindicator_gtkver "ayatana-appindicator3") + set (gtk_valapkgver "gtk+-3.0") +elseif (FLAVOUR_GTK2) + set (ayatana_appindicator_gtkver "ayatana-appindicator") + set (gtk_valapkgver "gtk+-2.0") +endif() + # simple-client-vala.c -add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c" - DEPENDS "bindings-vala" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND - ${VALA_COMPILER} - --pkg ayatana-appindicator3-0.1 - --pkg gtk+-3.0 - --vapidir=${CMAKE_BINARY_DIR}/bindings/vala - -C simple-client-vala.vala - --directory=${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMAND - sed - -i "s|#include\\s*<\\s*libayatana-appindicator/app-indicator.h\\s*>||g" - "${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c" -) - -# simple-client-vala - -set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -include ${CMAKE_SOURCE_DIR}/src/app-indicator.h") -add_executable("simple-client-vala" "${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c") -target_include_directories("simple-client-vala" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_link_libraries("simple-client-vala" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3 -L${CMAKE_BINARY_DIR}/src") -add_dependencies("simple-client-vala" "ayatana-appindicator3") +# Vala bindings are only available for FLAVOUR_GTK3 + +if (FLAVOUR_GTK3) + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c" + DEPENDS "bindings-vala" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND + ${VALA_COMPILER} + --pkg ${ayatana_appindicator_gtkver}-0.1 + --pkg ${gtk_valapkgver} + --vapidir=${CMAKE_BINARY_DIR}/bindings/vala + -C simple-client-vala.vala + --directory=${CMAKE_CURRENT_BINARY_DIR} + VERBATIM + COMMAND + sed + -i "s|#include\\s*<\\s*libayatana-appindicator/app-indicator.h\\s*>||g" + "${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c" + ) + + # simple-client-vala + + set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -include ${CMAKE_SOURCE_DIR}/src/app-indicator.h") + add_executable("simple-client-vala" "${CMAKE_CURRENT_BINARY_DIR}/simple-client-vala.c") + target_include_directories("simple-client-vala" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) + target_link_libraries("simple-client-vala" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver} -L${CMAKE_BINARY_DIR}/src") + add_dependencies("simple-client-vala" "${ayatana_appindicator_gtkver}") + +endif() # simple-client @@ -33,5 +46,5 @@ add_executable("simple-client" "${CMAKE_CURRENT_SOURCE_DIR}/simple-client.c") target_compile_definitions("simple-client" PUBLIC LOCAL_ICON="${CMAKE_CURRENT_SOURCE_DIR}/simple-client-test-icon.png") target_include_directories("simple-client" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("simple-client" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("simple-client" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3 -L${CMAKE_BINARY_DIR}/src") -add_dependencies("simple-client" "ayatana-appindicator3") +target_link_libraries("simple-client" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver} -L${CMAKE_BINARY_DIR}/src") +add_dependencies("simple-client" "${ayatana_appindicator_gtkver}") diff --git a/src/AyatanaAppIndicator-0.1.metadata b/src/AyatanaAppIndicator-0.1.metadata new file mode 100644 index 0000000..09d457d --- /dev/null +++ b/src/AyatanaAppIndicator-0.1.metadata @@ -0,0 +1,3 @@ +AyatanaAppIndicator3 name="AppIndicator" +Indicator.priv hidden="1" +IndicatorPrivate hidden="1" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a0ce71..12f3b6c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,12 +11,22 @@ set(SOURCES gen-notification-watcher.xml.c ) -install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/app-indicator.h" DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/libayatana-appindicator3-0.1/libayatana-appindicator") +if (FLAVOUR_GTK3) + set (ayatana_appindicator_gtkver "ayatana-appindicator3") + set (ayatana_appindicator_girver "AyatanaAppIndicator3") + set (gtk_girver "Gtk-3.0") +elseif (FLAVOUR_GTK2) + set (ayatana_appindicator_gtkver "ayatana-appindicator") + set (ayatana_appindicator_girver "AyatanaAppIndicator") + set (gtk_girver "Gtk-2.0") +endif() -# ayatana-appindicator3-0.1.pc +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/app-indicator.h" DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/lib${ayatana_appindicator_gtkver}-0.1/libayatana-appindicator") -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-appindicator3-0.1.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-0.1.pc" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-appindicator3-0.1.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") +# ayatana-appindicator{,3}-0.1.pc + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${ayatana_appindicator_gtkver}-0.1.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-0.1.pc" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_gtkver}-0.1.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") # app-indicator-enum-types.h @@ -32,7 +42,7 @@ add_custom_command( --output="${CMAKE_CURRENT_BINARY_DIR}/app-indicator-enum-types.h" ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/app-indicator-enum-types.h" DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/libayatana-appindicator3-0.1/libayatana-appindicator") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/app-indicator-enum-types.h" DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/lib${ayatana_appindicator_gtkver}-0.1/libayatana-appindicator") # app-indicator-enum-types.c @@ -106,27 +116,27 @@ string(PREPEND GEN_NOTIFICATION_WATCHER_XML_C "const char * _notification_watche string(APPEND GEN_NOTIFICATION_WATCHER_XML_C "\;") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/gen-notification-watcher.xml.c" ${GEN_NOTIFICATION_WATCHER_XML_C}) -# libayatana-appindicator3.so +# libayatana-appindicator{,3}.so set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) -add_library("ayatana-appindicator3" SHARED ${SOURCES}) -set_target_properties("ayatana-appindicator3" PROPERTIES VERSION 1.0.0 SOVERSION 1) -target_compile_definitions("ayatana-appindicator3" PUBLIC G_LOG_DOMAIN="libayatana-appindicator") -target_include_directories("ayatana-appindicator3" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_include_directories("ayatana-appindicator3" PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -target_include_directories("ayatana-appindicator3" PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries("ayatana-appindicator3" ${PROJECT_DEPS_LIBRARIES}) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3.so" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3.so.1" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator3.so.1.0.0" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") - -# AyatanaAppIndicator3-0.1.gir +add_library("${ayatana_appindicator_gtkver}" SHARED ${SOURCES}) +set_target_properties("${ayatana_appindicator_gtkver}" PROPERTIES VERSION 1.0.0 SOVERSION 1) +target_compile_definitions("${ayatana_appindicator_gtkver}" PUBLIC G_LOG_DOMAIN="libayatana-appindicator") +target_include_directories("${ayatana_appindicator_gtkver}" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) +target_include_directories("${ayatana_appindicator_gtkver}" PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories("${ayatana_appindicator_gtkver}" PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries("${ayatana_appindicator_gtkver}" ${PROJECT_DEPS_LIBRARIES}) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}.so" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}.so.1" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}.so.1.0.0" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") + +# AyatanaAppIndicator{,3}-0.1.gir find_package(GObjectIntrospection REQUIRED QUIET) add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.gir" - DEPENDS "ayatana-appindicator3" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.gir" + DEPENDS "${ayatana_appindicator_gtkver}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${INTROSPECTION_SCANNER} @@ -135,32 +145,31 @@ add_custom_command( --c-include=libayatana-appindicator/app-indicator.h --symbol-prefix=app --identifier-prefix=App - --namespace=AyatanaAppIndicator3 + --namespace=${ayatana_appindicator_girver} --nsversion=0.1 --quiet --warn-all --include=GObject-2.0 - --include=Gtk-3.0 + --include=${gtk_girver} --library-path=${CMAKE_CURRENT_BINARY_DIR} - --library="ayatana-appindicator3" - --output "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.gir" + --library="${ayatana_appindicator_gtkver}" + --output "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.gir" ) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0") -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.gir" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0") - -# AyatanaAppIndicator3-0.1.typelib +# AyatanaAppIndicator{,3}-0.1.typelib add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.typelib" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.gir" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.typelib" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.gir" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.gir - -o "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.typelib" + ${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.gir + -o "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.typelib" ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.typelib" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.typelib" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0") -add_custom_target(src ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/AyatanaAppIndicator3-0.1.typelib") +add_custom_target(src ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.typelib") diff --git a/src/ayatana-appindicator-0.1.pc.in b/src/ayatana-appindicator-0.1.pc.in index 4e35cb4..37e8c82 100644 --- a/src/ayatana-appindicator-0.1.pc.in +++ b/src/ayatana-appindicator-0.1.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libayatana-appindicator-0.1 -Requires: dbusmenu-glib-0.4 gtk+-2.0 +Requires: ayatana-indicator-0.4 dbusmenu-glib-0.4 gtk+-2.0 Libs: -L${libdir} -layatana-appindicator Name: ayatana-appindicator-0.1 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 03771ba..ede1957 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,9 @@ +if (FLAVOUR_GTK3) + set (ayatana_appindicator_gtkver "ayatana-appindicator3") +elseif (FLAVOUR_GTK2) + set (ayatana_appindicator_gtkver "ayatana-appindicator") +endif() + # test-libappindicator set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -include ${CMAKE_SOURCE_DIR}/src/app-indicator.h") @@ -5,9 +11,9 @@ add_executable("test-libappindicator" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappin target_compile_definitions("test-libappindicator" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") target_include_directories("test-libappindicator" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator" "ayatana-appindicator3") +add_dependencies("test-libappindicator" "${ayatana_appindicator_gtkver}") # test-libappindicator-dbus-client @@ -15,9 +21,9 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator.c" add_executable("test-libappindicator-dbus-client" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-dbus-client.c") target_include_directories("test-libappindicator-dbus-client" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-dbus-client" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-dbus-client" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-dbus-client" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-dbus-client" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-dbus-client" "ayatana-appindicator3") +add_dependencies("test-libappindicator-dbus-client" "${ayatana_appindicator_gtkver}") # test-libappindicator-dbus-server @@ -25,18 +31,18 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-db add_executable("test-libappindicator-dbus-server" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-dbus-server.c") target_include_directories("test-libappindicator-dbus-server" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-dbus-server" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-dbus-server" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-dbus-server" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-dbus-server" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-dbus-server" "ayatana-appindicator3") +add_dependencies("test-libappindicator-dbus-server" "${ayatana_appindicator_gtkver}") # test-libappindicator-status-client set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-status-client.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}") add_executable("test-libappindicator-status-client" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-status-client.c") target_include_directories("test-libappindicator-status-client" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_link_libraries("test-libappindicator-status-client" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-status-client" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-status-client" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-status-client" "ayatana-appindicator3") +add_dependencies("test-libappindicator-status-client" "${ayatana_appindicator_gtkver}") # test-libappindicator-status-server @@ -44,9 +50,9 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-st add_executable("test-libappindicator-status-server" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-status-server.c") target_include_directories("test-libappindicator-status-server" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-status-server" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-status-server" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-status-server" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-status-server" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-status-server" "ayatana-appindicator3") +add_dependencies("test-libappindicator-status-server" "${ayatana_appindicator_gtkver}") # test-libappindicator-fallback-item @@ -54,18 +60,18 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fa add_executable("test-libappindicator-fallback-item" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fallback-item.c") target_include_directories("test-libappindicator-fallback-item" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-fallback-item" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-fallback-item" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-fallback-item" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-fallback-item" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-fallback-item" "ayatana-appindicator3") +add_dependencies("test-libappindicator-fallback-item" "${ayatana_appindicator_gtkver}") # test-libappindicator-fallback-watcher set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fallback-watcher.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}") add_executable("test-libappindicator-fallback-watcher" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fallback-watcher.c") target_include_directories("test-libappindicator-fallback-watcher" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_link_libraries("test-libappindicator-fallback-watcher" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-fallback-watcher" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-fallback-watcher" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-fallback-watcher" "ayatana-appindicator3") +add_dependencies("test-libappindicator-fallback-watcher" "${ayatana_appindicator_gtkver}") # test-simple-app @@ -73,9 +79,9 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-simple-app.c" PROP add_executable("test-simple-app" "${CMAKE_CURRENT_SOURCE_DIR}/test-simple-app.c") target_include_directories("test-simple-app" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-simple-app" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-simple-app" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-simple-app" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-simple-app" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-simple-app" "ayatana-appindicator3") +add_dependencies("test-simple-app" "${ayatana_appindicator_gtkver}") # test-libappindicator-fallback -- cgit v1.2.3