summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2010-05-04 20:18:35 +0200
committerBardur Arantsson <bardur@scientician.net>2010-05-04 20:18:35 +0200
commit25847ccde0bcca3e2dcbf5e80cc05ea2f1f76614 (patch)
tree3eb399108c61f4d20af987a13c9f324c9fd02dac
parent09199895acfc58c1fe04757173749fb052a2402b (diff)
Add support for building the GTK2 interface with the CMake build system.
-rw-r--r--CMakeLists.txt11
-rw-r--r--src/CMakeLists.txt2
2 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b8b149b..547e50d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,17 @@ IF(X11_FOUND)
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)
#
FIND_PACKAGE(SDL)
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