aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.build.yml61
-rw-r--r--CMakeLists.txt31
-rw-r--r--bindings/CMakeLists.txt4
-rw-r--r--bindings/mono/ApplicationIndicatorCustom.cs.in (renamed from bindings/mono/ApplicationIndicatorCustom.cs)6
-rw-r--r--bindings/mono/CMakeLists.txt279
-rw-r--r--bindings/mono/app-indicator.sources.xml.in4
-rw-r--r--bindings/mono/ayatana-appindicator-sharp-0.1.pc.in12
-rw-r--r--bindings/mono/ayatana-appindicator-sharp.dll.config7
-rw-r--r--bindings/mono/ayatana-appindicator-sharp.snkbin0 -> 596 bytes
-rw-r--r--bindings/mono/examples/CMakeLists.txt33
-rw-r--r--bindings/mono/libayatana-appindicator-api.metadata66
-rw-r--r--bindings/mono/policy.0.0.ayatana-appindicator-sharp.config.in10
-rw-r--r--bindings/mono/policy.0.1.ayatana-appindicator-sharp.config.in10
-rw-r--r--debian/control120
-rw-r--r--debian/libayatana-appindicator-dev.install1
-rw-r--r--debian/libayatana-appindicator-doc.install2
-rw-r--r--debian/libayatana-appindicator1.symbols10
-rwxr-xr-xdebian/rules27
-rw-r--r--docs/reference/CMakeLists.txt9
-rw-r--r--docs/reference/scangobj.sh.in2
-rw-r--r--example/CMakeLists.txt67
-rw-r--r--src/AyatanaAppIndicator-0.1.metadata3
-rw-r--r--src/CMakeLists.txt75
-rw-r--r--src/ayatana-appindicator-0.1.pc.in2
-rw-r--r--tests/CMakeLists.txt38
25 files changed, 597 insertions, 282 deletions
diff --git a/.build.yml b/.build.yml
index ad5776d..d92bbc3 100644
--- a/.build.yml
+++ b/.build.yml
@@ -120,9 +120,18 @@ before_scripts:
- git clone --depth 1 https://github.com/AyatanaIndicators/libayatana-indicator.git libayatana-indicator-build
- fi
- cd libayatana-indicator-build
- - cmake . -DCMAKE_INSTALL_PREFIX=/usr
+ - mkdir -p build/gtk3
+ - cd build/gtk3
+ - cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DFLAVOUR_GTK3=ON
+ - make
+ - make install
+ - cd -
+ - mkdir -p build/gtk2
+ - cd build/gtk2
+ - cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DFLAVOUR_GTK2=ON
- make
- make install
+ - cd -
build_scripts:
- if [ ${DISTRO_NAME} == "debian" ];then
@@ -130,41 +139,69 @@ build_scripts:
- cppcheck --enable=warning,style,performance,portability,information,missingInclude .
- fi
-
- - if [ -e ./autogen.sh ]; then
- - NOCONFIGURE=1 ./autogen.sh
- - scan-build $CHECKERS ./configure --prefix=/usr --enable-gtk-doc --enable-compile-warnings=maximum
- - elif [ -e ./CMakeLists.txt ]; then
- - if [ ${DISTRO_NAME} == "debian" ];then
- - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON
+ - if [ -e ./CMakeLists.txt ]; then
+ - mkdir -p build/gtk3/
+ - cd build/gtk3/
+ - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then
+ - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAOUR_GTK3=ON
- else
- - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON
+ - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAOUR_GTK3=ON
- fi
+ - cd -
+ - mkdir -p build/gtk2/
+ - cd build/gtk2/
+ - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then
+ - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAOUR_GTK2=ON
+ - else
+ - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAOUR_GTK2=ON
+ - fi
+ - cd -
- else
- exit 1
- fi
-
- if [ $CPU_COUNT -gt 1 ]; then
- if [ ${DISTRO_NAME} == "debian" ];then
+ - cd build/gtk3/
- scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT
- make clean
+ - cd -
+ - cd build/gtk2/
+ - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT
+ - make clean
+ - cd -
- fi
- scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT
- else
- if [ ${DISTRO_NAME} == "debian" ];then
+ - cd build/gtk3/
+ - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make
+ - make clean
+ - cd -
+ - cd build/gtk2/
- scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make
- make clean
+ - cd -
- fi
+ - cd build/gtk3/
- scan-build $CHECKERS --keep-cc -o html-report make
+ - cd -
+ - cd build/gtk2/
+ - scan-build $CHECKERS --keep-cc -o html-report make
+ - cd -
- fi
after_scripts:
- if [ ${BUILD_TYPE} == "scripts" ];then
- XVFB_RUN="$(which xvfb-run || true)"
- - if [ ${DISTRO_NAME} == "debian" ];then
- - if [ -e ./autogen.sh ]; then
- - ${XVFB_RUN} make check
- - elif [ -e ./CMakeLists.txt ]; then
+ - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then
+ - if [ -e ./CMakeLists.txt ]; then
+ - cd build/gtk3/
+ - ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test
+ - cd -
+ - cd build/gtk2/
- ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test
+ - cd -
- fi
- fi
- fi
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.in
index 7e4b24c..426e930 100644
--- a/bindings/mono/ApplicationIndicatorCustom.cs
+++ b/bindings/mono/ApplicationIndicatorCustom.cs.in
@@ -5,13 +5,13 @@ namespace AyatanaAppIndicator
{
public partial class ApplicationIndicator : GLib.Object
{
- [DllImport ("ayatana-appindicator3.dll")]
+ [DllImport ("@ayatana_appindicator_gtkver@.dll")]
static extern int app_indicator_get_status (IntPtr i);
- [DllImport ("ayatana-appindicator3.dll")]
+ [DllImport ("@ayatana_appindicator_gtkver@.dll")]
static extern int app_indicator_get_category (IntPtr i);
- [DllImport ("ayatana-appindicator3.dll")]
+ [DllImport ("@ayatana_appindicator_gtkver@.dll")]
static extern void app_indicator_set_status (IntPtr i, int s);
[GLib.Property ("status")]
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 @@
<gapi-parser-input>
- <api filename="libayatana-appindicator3-api.raw">
- <library name="ayatana-appindicator3.dll">
+ <api filename="lib@ayatana_appindicator_gtkver@-api.raw">
+ <library name="@ayatana_appindicator_gtkver@.dll">
<namespace name="AyatanaAppIndicator">
<file>@REL_SRC@src/app-indicator.c</file>
<file>@REL_BIN@src/app-indicator-enum-types.c</file>
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 @@
+<configuration>
+ <dllmap dll="ayatana-appindicator.dll" target="libayatana-appindicator.so.1"/>
+ <dllmap dll="libgtk-2.0-0.dll" target="libgtk-2.0.so.0"/>
+ <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
+ <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
+ <dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0.so.0"/>
+</configuration>
diff --git a/bindings/mono/ayatana-appindicator-sharp.snk b/bindings/mono/ayatana-appindicator-sharp.snk
new file mode 100644
index 0000000..efb62d0
--- /dev/null
+++ b/bindings/mono/ayatana-appindicator-sharp.snk
Binary files 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 @@
+<?xml version="1.0"?>
+<metadata>
+ <attr path="/api/namespace/object[@cname='AppIndicator']" name="name">ApplicationIndicator</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_attention_icon']" name="name">NewAttentionIcon</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_attention_icon']" name="cname">new-attention-icon</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_status']" name="name">NewStatus</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_status']" name="cname">new-status</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="name">NewLabel</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="cname">new-label</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_accessible_desc']" name="name">NewAccessibleDesc</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_accessible_desc']" name="cname">new-accessible-desc</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="name">ConnectionChanged</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="cname">connection-changed</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='scroll_event']" name="name">ScrollEvent</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='scroll_event']" name="cname">scroll-event</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="name">NewIcon</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="cname">new-icon</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="name">NewIconThemePath</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="cname">new-icon-theme-path</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ID_S']" name="name">ID</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CATEGORY_S']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_STATUS_S']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ICON_NAME_S']" name="name">IconName</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ATTENTION_ICON_NAME_S']" name="name">AttentionIconName</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ICON_THEME_PATH_S']" name="name">IconThemePath</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="name">Menu</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="type">GtkMenu*</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CONNECTED_S']" name="name">Connected</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_S']" name="name">Label</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_GUIDE_S']" name="name">LabelGuide</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ACCESSIBLE_DESC_S']" name="name">AccessibleDesc</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ORDERING_INDEX_S']" name="name">OrderingIndex</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/method[@name='SetMenu']" name="name">SetMenu</attr>
+
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='id']" name="property_name">id</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='icon_name']" name="property_name">icon-name</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='category']" name="property_name">category</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='id']" name="property_name">id</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_name']" name="property_name">icon-name</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='category']" name="property_name">category</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_theme_path']" name="property_name">icon-theme-path</attr>
+
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_GUIDE_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_ORDERING_INDEX_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_ACCESSIBLE_DESC_S']" />
+
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_id']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_status']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon_theme_path']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_category']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_attention_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label_guide']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_ordering_index']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_accessible_desc']" />
+
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_status']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon_theme_path']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_attention_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_label']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_ordering_index']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_accessible_desc']" />
+</metadata>
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 @@
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="ayatana-appindicator-sharp" publicKeyToken="bcae265d1c7ab4c2" />
+ <bindingRedirect oldVersion="0.0.0.0-0.1.0.0" newVersion="@PROJECT_VERSION@.0"/>
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
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 @@
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="ayatana-appindicator-sharp" publicKeyToken="bcae265d1c7ab4c2" />
+ <bindingRedirect oldVersion="0.1.0.0-@PROJECT_VERSION@.0" newVersion="@PROJECT_VERSION@.0"/>
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
diff --git a/debian/control b/debian/control
index f2281bc..2124a4d 100644
--- a/debian/control
+++ b/debian/control
@@ -39,45 +39,45 @@ Homepage: https://github.com/AyatanaIndicators/libayatana-appindicator
Vcs-Git: https://github.com/AyatanaIndicators/libayatana-appindicator
Vcs-Browser: https://github.com/AyatanaIndicators/libayatana-appindicator
-#Package: libayatana-appindicator1
-#Architecture: any
-#Depends: ${shlibs:Depends},
-# ${misc:Depends},
-#Description: Ayatana Application Indicators (GTK-2+ version)
-# A library and indicator to take menus from applications and place them in
-# the panel.
-# .
-# This package contains shared libraries to be used by applications compiled
-# against GTK-2+.
+Package: libayatana-appindicator1
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+Description: Ayatana Application Indicators (GTK-2+ version)
+ A library and indicator to take menus from applications and place them in
+ the panel.
+ .
+ This package contains shared libraries to be used by applications compiled
+ against GTK-2+.
-#Package: gir1.2-ayatanaappindicator-0.1
-#Section: introspection
-#Architecture: any
-#Depends: ${misc:Depends},
-# ${gir:Depends},
-#Description: Typelib files for libayatana-appindicator1 (GTK-2+ version)
-# A library and indicator to take menus from applications and place them in
-# the panel.
-# .
-# This package can be used by other packages using the GIRepository format
-# to generate dynamic bindings (GTK-2+ version).
+Package: gir1.2-ayatanaappindicator-0.1
+Section: introspection
+Architecture: any
+Depends: ${misc:Depends},
+ ${gir:Depends},
+Description: Typelib files for libayatana-appindicator1 (GTK-2+ version)
+ A library and indicator to take menus from applications and place them in
+ the panel.
+ .
+ This package can be used by other packages using the GIRepository format
+ to generate dynamic bindings (GTK-2+ version).
-#Package: libayatana-appindicator-dev
-#Section: libdevel
-#Architecture: any
-#Depends: ${shlibs:Depends},
-# ${misc:Depends},
-# libgtk2.0-dev,
-# gir1.2-ayatanaappindicator-0.1 (= ${binary:Version}),
-# libdbusmenu-glib-dev (>= 0.1.8),
-# libdbus-glib-1-dev (>= 0.76),
-# libayatana-appindicator1 (= ${binary:Version}),
-#Description: Ayatana Application Indicators (development files, GTK-2+ version)
-# A library and indicator to take menus from applications and place them in
-# the panel.
-# .
-# This package contains files that are needed to build applications
-# (GTK-2+ version).
+Package: libayatana-appindicator-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ libgtk2.0-dev,
+ gir1.2-ayatanaappindicator-0.1 (= ${binary:Version}),
+ libdbusmenu-glib-dev (>= 0.1.8),
+ libdbus-glib-1-dev (>= 0.76),
+ libayatana-appindicator1 (= ${binary:Version}),
+Description: Ayatana Application Indicators (development files, GTK-2+ version)
+ A library and indicator to take menus from applications and place them in
+ the panel.
+ .
+ This package contains files that are needed to build applications
+ (GTK-2+ version).
Package: libayatana-appindicator-doc
Section: doc
@@ -129,30 +129,30 @@ Description: Typelib files for libayatana-appindicator3-1 (GTK-3+ version)
This package can be used by other packages using the GIRepository format
to generate dynamic bindings (GTK-3+ version).
-#Package: libayatana-appindicator0.1-cil
-#Section: cli-mono
-#Architecture: amd64 arm64 armel armhf i386 mipsel ppc64el s390x kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
-#Depends: ${shlibs:Depends},
-# ${misc:Depends},
-# ${cli:Depends},
-#Description: CLI bindings for libayatana-appindicator
-# This package provides the appindicator-sharp assembly that allows CLI (.NET)
-# programs to take menus from applications and place them in the panel.
-# .
-# This package contains assemblies to be used by GTK-2+ Mono applications.
+Package: libayatana-appindicator0.1-cil
+Section: cli-mono
+Architecture: amd64 arm64 armel armhf i386 mipsel ppc64el s390x kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ ${cli:Depends},
+Description: CLI bindings for libayatana-appindicator
+ This package provides the appindicator-sharp assembly that allows CLI (.NET)
+ programs to take menus from applications and place them in the panel.
+ .
+ This package contains assemblies to be used by GTK-2+ Mono applications.
-#Package: libayatana-appindicator0.1-cil-dev
-#Section: cli-mono
-#Architecture: amd64 arm64 armel armhf i386 mipsel ppc64el s390x kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
-#Depends: ${shlibs:Depends},
-# ${misc:Depends},
-# ${cli:Depends},
-# libayatana-appindicator0.1-cil (= ${binary:Version}),
-#Description: Ayatana Application Indicators for Mono (GTK-2+ variant)
-# A library and indicator to take menus from applications and place them in
-# the panel.
-# .
-# This package contains files that are needed to build Mono applications.
+Package: libayatana-appindicator0.1-cil-dev
+Section: cli-mono
+Architecture: amd64 arm64 armel armhf i386 mipsel ppc64el s390x kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ ${cli:Depends},
+ libayatana-appindicator0.1-cil (= ${binary:Version}),
+Description: Ayatana Application Indicators for Mono (GTK-2+ variant)
+ A library and indicator to take menus from applications and place them in
+ the panel.
+ .
+ This package contains files that are needed to build Mono applications.
Package: libayatana-appindicator3-0.1-cil
Section: cli-mono
diff --git a/debian/libayatana-appindicator-dev.install b/debian/libayatana-appindicator-dev.install
index 763a667..371055d 100644
--- a/debian/libayatana-appindicator-dev.install
+++ b/debian/libayatana-appindicator-dev.install
@@ -2,4 +2,3 @@ usr/include/libayatana-appindicator-0.1/*
usr/lib/*/libayatana-appindicator.so
usr/lib/*/pkgconfig/ayatana-appindicator-0.1.pc
usr/share/gir-1.0/AyatanaAppIndicator-0.1.gir
-usr/share/vala/vapi/ayatana-appindicator-0.1.vapi
diff --git a/debian/libayatana-appindicator-doc.install b/debian/libayatana-appindicator-doc.install
index f454912..b0e75e4 100644
--- a/debian/libayatana-appindicator-doc.install
+++ b/debian/libayatana-appindicator-doc.install
@@ -1 +1 @@
-usr/share/gtk-doc/html/libayatana-appindicator/*
+usr/share/gtk-doc/html/libayatana-appindicator3/*
diff --git a/debian/libayatana-appindicator1.symbols b/debian/libayatana-appindicator1.symbols
index 6ffb9c7..d0aab6f 100644
--- a/debian/libayatana-appindicator1.symbols
+++ b/debian/libayatana-appindicator1.symbols
@@ -1,4 +1,14 @@
libayatana-appindicator.so.1 libayatana-appindicator1 #MINVER#
+ _application_service_marshal_VOID__BOOLEAN_STRING_OBJECT@Base 0.5.90
+ _application_service_marshal_VOID__INT_INT@Base 0.5.90
+ _application_service_marshal_VOID__INT_STRING@Base 0.5.90
+ _application_service_marshal_VOID__INT_STRING_STRING@Base 0.5.90
+ _application_service_marshal_VOID__INT_UINT@Base 0.5.90
+ _application_service_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING@Base 0.5.90
+ _application_service_marshal_VOID__STRING_STRING@Base 0.5.90
+ _generate_id@Base 0.5.90
+ _notification_item@Base 0.5.90
+ _notification_watcher@Base 0.5.90
app_indicator_build_menu_from_desktop@Base 0.2.91
app_indicator_category_get_type@Base 0.2.91
app_indicator_get_attention_icon@Base 0.2.91
diff --git a/debian/rules b/debian/rules
index 69d331c..83ff536 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,8 +2,7 @@
include /usr/share/dpkg/architecture.mk
-#FLAVORS = gtk2 gtk3
-FLAVORS = gtk3
+FLAVOURS = gtk3 gtk2
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
@@ -18,9 +17,8 @@ ifeq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 armel armhf i386 mipsel ppc64el s39
else
dh_extra_args = ,cli
endif
-#CONFIGURE_FLAGS_gtk2 = -DENABLE_GTK2=ON -DENABLE_GTK_DOC=ON
-#CONFIGURE_FLAGS_gtk3 = -DENABLE_GTK3=ON -DENABLE_GTK_DOC=ON
-CONFIGURE_FLAGS_gtk3 =
+CONFIGURE_FLAGS_gtk2 = -DFLAVOUR_GTK2=ON -DENABLE_GTKDOC=OFF
+CONFIGURE_FLAGS_gtk3 = -DFLAVOUR_GTK3=ON -DENABLE_GTKDOC=ON
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
@@ -29,17 +27,17 @@ CFLAGS += -fPIC
%:
dh $@ --with gir$(dh_extra_args)
-override_dh_auto_configure: $(FLAVORS:%=doconfigure-%)
+override_dh_auto_configure: $(FLAVOURS:%=doconfigure-%)
doconfigure-%:
dh_auto_configure --builddirectory=build/$* -- $(CONFIGURE_FLAGS_$*) $(CONFIGURE_COMMON_FLAGS)
-override_dh_auto_build: $(FLAVORS:%=dobuild-%)
+override_dh_auto_build: $(FLAVOURS:%=dobuild-%)
dobuild-%:
dh_auto_build --builddirectory=build/$*
-override_dh_auto_install: $(FLAVORS:%=doinstall-%)
+override_dh_auto_install: $(FLAVOURS:%=doinstall-%)
doinstall-%:
dh_auto_install --builddirectory=build/$* --destdir=debian/tmp/$*
@@ -49,9 +47,9 @@ override_dh_install:
find debian/tmp -name \*.a -exec rm {} \;
rm -rf debian/tmp/*/usr/lib/mono
rm -rf debian/tmp/*/usr/share/vala/vapi/ayatana-appindicator*-0.1.deps
- #dh_install -plibayatana-appindicator1 --fail-missing --sourcedir=debian/tmp/gtk2
- #dh_install -pgir1.2-ayatanaappindicator-0.1 --fail-missing --sourcedir=debian/tmp/gtk2
- #dh_install -plibayatana-appindicator-dev --fail-missing --sourcedir=debian/tmp/gtk2
+ dh_install -plibayatana-appindicator1 --fail-missing --sourcedir=debian/tmp/gtk2
+ dh_install -pgir1.2-ayatanaappindicator-0.1 --fail-missing --sourcedir=debian/tmp/gtk2
+ dh_install -plibayatana-appindicator-dev --fail-missing --sourcedir=debian/tmp/gtk2
dh_install -plibayatana-appindicator-doc --fail-missing --sourcedir=debian/tmp/gtk3
dh_install -plibayatana-appindicator3-1 --fail-missing --sourcedir=debian/tmp/gtk3
dh_install -plibayatana-appindicator3-dev --fail-missing --sourcedir=debian/tmp/gtk3
@@ -59,11 +57,10 @@ override_dh_install:
if echo amd64 arm64 armel armhf i386 mipsel ppc64el s390x kfreebsd-amd64 kfreebsd-i386 powerpc ppc64 | grep -q $(DEB_HOST_ARCH); then \
dh_install -plibayatana-appindicator3-0.1-cil --fail-missing --sourcedir=debian/tmp/gtk3; \
dh_install -plibayatana-appindicator3-0.1-cil-dev --fail-missing --sourcedir=debian/tmp/gtk3; \
+ dh_install -plibayatana-appindicator0.1-cil --fail-missing --sourcedir=debian/tmp/gtk2; \
+ dh_install -plibayatana-appindicator0.1-cil-dev --fail-missing --sourcedir=debian/tmp/gtk2; \
fi
- # these belong into above if clause, once GTK-2+ builds are possible again...
- # dh_install -plibayatana-appindicator0.1-cil --fail-missing --sourcedir=debian/tmp/gtk2; \
- # dh_install -plibayatana-appindicator0.1-cil-dev --fail-missing --sourcedir=debian/tmp/gtk2; \
-
+
override_dh_auto_test:
mkdir -p $(CURDIR)/debian/tmphome-gtk3/.local/share
mkdir -p $(CURDIR)/debian/tmphome-gtk3/.cache
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