aboutsummaryrefslogtreecommitdiff
path: root/bindings/mono/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-10-23 18:37:04 +0200
committerRobert Tari <robert@tari.in>2021-10-23 18:37:04 +0200
commit7e4b6714abaf2245e3ba590c67e93c2adf4d0a69 (patch)
tree271461a0a21ab24efe629878b162d6591d9b5b38 /bindings/mono/examples/CMakeLists.txt
parent69f835796ad89c39f232aa4073c778976c54e01f (diff)
parent91bddd96cf1f8d7975b1cb3b160b89c7f4a53af7 (diff)
downloadlibayatana-appindicator-7e4b6714abaf2245e3ba590c67e93c2adf4d0a69.tar.gz
libayatana-appindicator-7e4b6714abaf2245e3ba590c67e93c2adf4d0a69.tar.bz2
libayatana-appindicator-7e4b6714abaf2245e3ba590c67e93c2adf4d0a69.zip
Merge branch 'sunweaver-pr/bring-back-gtk2-build-support'
Attributes GH PR #32: https://github.com/AyatanaIndicators/libayatana-appindicator/pull/33
Diffstat (limited to 'bindings/mono/examples/CMakeLists.txt')
-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")