aboutsummaryrefslogtreecommitdiff
path: root/bindings/mono/examples
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-10-23 03:00:53 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-10-23 16:02:24 +0200
commitc72376856260360074879a5c91217c66c934558d (patch)
tree5cf57abee673e8fd0630e7b18d65fd602b39dc78 /bindings/mono/examples
parent1245eb78f2db30db8403cb4718de79e41a4a361b (diff)
downloadlibayatana-appindicator-c72376856260360074879a5c91217c66c934558d.tar.gz
libayatana-appindicator-c72376856260360074879a5c91217c66c934558d.tar.bz2
libayatana-appindicator-c72376856260360074879a5c91217c66c934558d.zip
Re-introduce (CMake based) build support against GTK+ 2.0.
Diffstat (limited to 'bindings/mono/examples')
-rw-r--r--bindings/mono/examples/CMakeLists.txt33
1 files changed, 23 insertions, 10 deletions
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")