From 25847ccde0bcca3e2dcbf5e80cc05ea2f1f76614 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 4 May 2010 20:18:35 +0200 Subject: Add support for building the GTK2 interface with the CMake build system. --- CMakeLists.txt | 11 +++++++++++ src/CMakeLists.txt | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b8b149b..547e50d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,17 @@ IF(X11_FOUND) SET(LIBS ${LIBS} ${X11_LIBRARIES}) ENDIF() +# +# GTK2 support (OPTIONAL) +# +FIND_PACKAGE(GTK2) +IF(GTK2_FOUND) + # Add GTK flags/options + ADD_DEFINITIONS(-DUSE_GTK2) + INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS}) + SET(LIBS ${LIBS} ${GTK2_LIBRARIES}) +ENDIF() + # # SDL support (OPTIONAL) # diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 973192e9..4bfad7ef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,7 +2,7 @@ ADD_SUBDIRECTORY(lua) SET(SRCS - main-gcu.c main-x11.c main-xaw.c main-sdl.c + main-gcu.c main-x11.c main-xaw.c main-sdl.c main-gtk2.c z-rand.c z-util.c z-form.c z-virt.c z-term.c z-sock.c variable.c tables.c plots.c util.c cave.c dungeon.c melee1.c melee2.c modules.c -- cgit v1.2.3