aboutsummaryrefslogtreecommitdiff
path: root/main/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'main/CMakeLists.txt')
-rw-r--r--main/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 010ff221..8baa393b 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -57,6 +57,14 @@ compile_gresources(
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data
)
+unset(MAIN_EXTRA_OPTIONS)
+unset(MAIN_EXTRA_PACKAGES)
+find_package(GDK3)
+if(GDK3_WITH_X11)
+ set(MAIN_EXTRA_OPTIONS ${MAIN_EXTRA_OPTIONS} -D GDK3_WITH_X11)
+ set(MAIN_EXTRA_PACKAGES ${MAIN_EXTRA_PACKAGES} gdk-x11-3.0)
+endif(GDK3_WITH_X11)
+
vala_precompile(MAIN_VALA_C
SOURCES
src/main.vala
@@ -107,9 +115,11 @@ CUSTOM_VAPIS
${CMAKE_BINARY_DIR}/exports/dino_internal.vapi
PACKAGES
${MAIN_PACKAGES}
- gdk-x11-3.0
+ ${MAIN_EXTRA_PACKAGES}
GRESOURCES
${MAIN_GRESOURCES_XML}
+OPTIONS
+ ${MAIN_EXTRA_OPTIONS}
)
add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\")