summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMake/Modules/FindGuichan.cmake97
-rw-r--r--CMake/Modules/FindLibXml2.cmake59
-rw-r--r--CMake/Modules/FindLibcurl.cmake41
-rw-r--r--CMakeLists.txt21
-rw-r--r--ChangeLog43
-rw-r--r--data/CMakeLists.txt13
-rw-r--r--data/graphics/CMakeLists.txt5
-rw-r--r--data/graphics/gui/CMakeLists.txt45
-rw-r--r--data/graphics/images/CMakeLists.txt16
-rw-r--r--data/help/CMakeLists.txt12
-rw-r--r--data/icons/CMakeLists.txt9
-rw-r--r--src/CMakeLists.txt303
-rw-r--r--src/main.h2
13 files changed, 665 insertions, 1 deletions
diff --git a/CMake/Modules/FindGuichan.cmake b/CMake/Modules/FindGuichan.cmake
new file mode 100644
index 00000000..fccfc499
--- /dev/null
+++ b/CMake/Modules/FindGuichan.cmake
@@ -0,0 +1,97 @@
+# - Try to find Guichan
+# Once done this will define
+#
+# GUICHAN_FOUND - system has Guichan
+# GUICHAN_INCLUDE_DIR - the Guichan include directory
+# GUICHAN_LIBRARIES - the libraries needed to use Guichan
+#
+# Supported components: SDL OpenGL
+#
+# TODO: Clean up the components stuff and try to add all known
+# components when none are specified. May not bail out for not found
+# components then, set some var instead...
+
+# Be quiet if Guichan was already found
+# We need an extra variable to have the check per component
+IF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY)
+ SET(Guichan_QUIET TRUE)
+ENDIF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY)
+
+
+FIND_PATH(Guichan_INCLUDE_DIR
+ NAMES guichan.hpp
+ PATHS /usr/include /usr/local/include
+ )
+
+FIND_LIBRARY(Guichan_LIBRARY
+ NAMES guichan
+ PATHS /usr/lib /usr/local/lib
+ )
+
+MARK_AS_ADVANCED(Guichan_INCLUDE_DIR Guichan_LIBRARY)
+
+
+IF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY)
+ SET(GUICHAN_FOUND TRUE)
+ SET(GUICHAN_INCLUDE_DIR ${Guichan_INCLUDE_DIR})
+ SET(GUICHAN_LIBRARIES ${Guichan_LIBRARY})
+
+ IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)
+ MESSAGE(STATUS "Found Guichan: ${Guichan_LIBRARY}")
+ ENDIF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)
+ENDIF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY)
+
+# Bail out if Guichan is not found but required
+IF (NOT GUICHAN_FOUND AND Guichan_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find Guichan library ${GUICHAN_INCLUDE_DIR}")
+ENDIF (NOT GUICHAN_FOUND AND Guichan_FIND_REQUIRED)
+
+
+# Check for guichan components
+FOREACH (COMPONENT ${Guichan_FIND_COMPONENTS})
+ SET(COMPONENT_FOUND FALSE)
+
+ IF (COMPONENT STREQUAL "SDL")
+ SET(COMPONENT_FOUND TRUE)
+ SET(Guichan_HEADER "guichan/sdl.hpp")
+ SET(Guichan_LIBRARY "guichan_sdl")
+ ENDIF (COMPONENT STREQUAL "SDL")
+
+ IF (COMPONENT STREQUAL "OpenGL")
+ SET(COMPONENT_FOUND TRUE)
+ SET(Guichan_HEADER "guichan/opengl.hpp")
+ SET(Guichan_LIBRARY "guichan_opengl")
+ ENDIF (COMPONENT STREQUAL "OpenGL")
+
+ IF (NOT COMPONENT_FOUND)
+ MESSAGE(FATAL_ERROR "Invalid Guichan component: ${COMPONENT}")
+ ENDIF (NOT COMPONENT_FOUND)
+
+ # Check if we already found this component
+ IF (Guichan_LIBRARY_${COMPONENT})
+ SET(Guichan_QUIET TRUE)
+ ELSE (Guichan_LIBRARY_${COMPONENT})
+ SET(Guichan_QUIET FALSE)
+ ENDIF (Guichan_LIBRARY_${COMPONENT})
+
+ FIND_LIBRARY(Guichan_LIBRARY_${COMPONENT}
+ NAMES ${Guichan_LIBRARY}
+ PATHS /usr/lib /usr/local/lib
+ )
+
+ MARK_AS_ADVANCED(Guichan_LIBRARY_${COMPONENT})
+
+ IF (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER} OR
+ NOT Guichan_LIBRARY_${COMPONENT})
+ SET(GUICHAN_FOUND FALSE)
+ MESSAGE(FATAL_ERROR "Could NOT find Guichan component ${COMPONENT}")
+ ENDIF (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER} OR
+ NOT Guichan_LIBRARY_${COMPONENT})
+
+ IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)
+ MESSAGE(STATUS "Found Guichan ${COMPONENT}: ${Guichan_LIBRARY_${COMPONENT}}")
+ ENDIF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)
+
+ SET(GUICHAN_LIBRARIES ${GUICHAN_LIBRARIES} ${Guichan_LIBRARY_${COMPONENT}})
+ENDFOREACH(COMPONENT)
+
diff --git a/CMake/Modules/FindLibXml2.cmake b/CMake/Modules/FindLibXml2.cmake
new file mode 100644
index 00000000..b45d7293
--- /dev/null
+++ b/CMake/Modules/FindLibXml2.cmake
@@ -0,0 +1,59 @@
+# - Try to find LibXml2
+# Once done this will define
+#
+# LIBXML2_FOUND - system has LibXml2
+# LIBXML2_INCLUDE_DIR - the LibXml2 include directory
+# LIBXML2_LIBRARIES - the libraries needed to use LibXml2
+# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
+#
+# Copyright (c) 2006, Alexander Neundorf <neundorf@kde.org>
+# This code is available under the BSD license, see licenses/BSD for details.
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
+ # in cache already
+ SET(LibXml2_FIND_QUIETLY TRUE)
+ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
+
+IF (NOT WIN32)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ INCLUDE(UsePkgConfig)
+ PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags)
+ SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags})
+ENDIF (NOT WIN32)
+
+FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
+ PATHS
+ ${_LibXml2IncDir}
+ PATH_SUFFIXES libxml2
+ )
+
+FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
+ PATHS
+ ${_LibXml2LinkDir}
+ )
+
+IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
+ SET(LIBXML2_FOUND TRUE)
+ELSE (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
+ SET(LIBXML2_FOUND FALSE)
+ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
+
+IF (LIBXML2_FOUND)
+ IF (NOT LibXml2_FIND_QUIETLY)
+ MESSAGE(STATUS "Found LibXml2: ${LIBXML2_LIBRARIES}")
+ ENDIF (NOT LibXml2_FIND_QUIETLY)
+ELSE (LIBXML2_FOUND)
+ IF (LibXml2_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Could NOT find LibXml2")
+ ENDIF (LibXml2_FIND_REQUIRED)
+ENDIF (LIBXML2_FOUND)
+
+MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES)
+
diff --git a/CMake/Modules/FindLibcurl.cmake b/CMake/Modules/FindLibcurl.cmake
new file mode 100644
index 00000000..fe389c49
--- /dev/null
+++ b/CMake/Modules/FindLibcurl.cmake
@@ -0,0 +1,41 @@
+# - Try to find libcurl
+# Once done this will define
+#
+# LIBCURL_FOUND - system has libcurl
+# LIBCURL_INCLUDE_DIR - the libcurl include directory
+# LIBCURL_LIBRARIES - the libraries needed to use libcurl
+# LIBCURL_DEFINITIONS - Compiler switches required for using libcurl
+
+IF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+ SET(Libcurl_FIND_QUIETLY TRUE)
+ENDIF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+
+FIND_PATH(Libcurl_INCLUDE_DIR curl/curl.h
+ /usr/include
+ /usr/local/include
+ )
+
+FIND_LIBRARY(Libcurl_LIBRARY
+ NAMES curl
+ PATHS /usr/lib /usr/local/lib
+ )
+
+IF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+ SET(LIBCURL_FOUND TRUE)
+ SET(LIBCURL_INCLUDE_DIR ${Libcurl_INCLUDE_DIR})
+ SET(LIBCURL_LIBRARIES ${Libcurl_LIBRARY})
+ELSE (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+ SET(LIBCURL_FOUND TRUE)
+ENDIF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+
+IF (LIBCURL_FOUND)
+ IF (NOT Libcurl_FIND_QUIETLY)
+ MESSAGE(STATUS "Found libcurl: ${Libcurl_LIBRARY}")
+ ENDIF (NOT Libcurl_FIND_QUIETLY)
+ELSE (LIBCURL_FOUND)
+ IF (Libcurl_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Could NOT find libcurl")
+ ENDIF (Libcurl_FIND_REQUIRED)
+ENDIF (LIBCURL_FOUND)
+
+MARK_AS_ADVANCED(Libcurl_INCLUDE_DIR Libcurl_LIBRARY)
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..c00bdff6
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,21 @@
+PROJECT(TMW)
+
+SET(VERSION 0.0.22)
+
+# where to look for cmake modules
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
+
+OPTION(WITH_OPENGL "Enable OpenGL support" ON)
+
+IF (WIN32)
+ SET(PKG_DATADIR ".")
+ SET(PKG_BINDIR ".")
+ELSE (WIN32)
+ SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/tmw)
+ SET(PKG_BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
+ENDIF (WIN32)
+
+ADD_SUBDIRECTORY(data)
+ADD_SUBDIRECTORY(src)
+
+INSTALL(FILES tmw.desktop DESTINATION share/applications)
diff --git a/ChangeLog b/ChangeLog
index d3651f8e..0fe7c1dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,49 @@
* configure.ac: Added zlib check before PhysFS check. The PhysFS check
was failing on MSYS because of a missing -lz.
+2006-10-22 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * CMakeLists.txt, src/CMakeLists.txt: Add PACKAGE_VERSION support.
+ * CMakeLists.txt, src/CMakeLists.txt: Setup the binary dir in the main
+ CMakeLists.txt file.
+ * src/main.h: Include config.h only when we have it.
+ * src/CMakeLists.txt: Properly set build flags for the tmw target.
+
+2006-10-18 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/CMakeLists.txt, data/graphics/tiles/CMakeLists.txt,
+ data/graphics/items/CMakeLists.txt, data/graphics/gui/CMakeLists.txt,
+ data/graphics/images/ambient/CMakeLists.txt,
+ data/graphics/images/CMakeLists.txt,
+ data/graphics/sprites/CMakeLists.txt, data/maps/CMakeLists.txt,
+ data/sfx/CMakeLists.txt, data/help/CMakeLists.txt,
+ data/icons/CMakeLists.txt, data/CMakeLists.txt, CMakeLists.txt: Add
+ TMW_DATADIR definition.
+
+2006-10-16 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/CMakeLists.txt: Adjusted path for Windows.
+
+2006-10-16 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * CMakeLists.txt: Enable OpenGL by default.
+ * CMake/Modules/FindLibcurl.cmake: Fix libcurl library not being
+ marked as advanced option.
+ * CMakeLists.txt, src/CMakeLists.txt: Add OpenGL option.
+ * data/CMakeLists.txt: Adjust data destination for Windows.
+ * src/CMakeLists.txt: Adjust binary destination for Windows.
+ * src/CMakeLists.txt, data/graphics/tiles/CMakeLists.txt,
+ data/graphics/items/CMakeLists.txt, data/graphics/gui/CMakeLists.txt,
+ data/graphics/images/ambient/CMakeLists.txt,
+ data/graphics/images/CMakeLists.txt,
+ data/graphics/sprites/CMakeLists.txt, data/graphics/CMakeLists.txt,
+ data/maps/CMakeLists.txt, data/sfx/CMakeLists.txt,
+ data/help/CMakeLists.txt, data/icons/CMakeLists.txt,
+ data/CMakeLists.txt, CMakeLists.txt: Add CMake install support.
+ * CMake/Modules/FindGuichan.cmake, CMake/Modules/FindLibXml2.cmake,
+ CMake/Modules/FindLibcurl.cmake, CMakeLists.txt, src/CMakeLists.txt:
+ Add basic CMake support for building tmw.
+
2006-10-12 Yohann Ferreira <bertram@cegetel.net>
* debian/rules, debian/tmw-data.install, debian/tmw-data.dirs,
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 00000000..36259082
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,13 @@
+SET(DATA_DIR ${PKG_DATADIR}/data)
+
+ADD_SUBDIRECTORY(graphics)
+ADD_SUBDIRECTORY(help)
+ADD_SUBDIRECTORY(icons)
+ADD_SUBDIRECTORY(maps)
+ADD_SUBDIRECTORY(sfx)
+
+SET(FILES
+ items.xml
+ )
+
+INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR})
diff --git a/data/graphics/CMakeLists.txt b/data/graphics/CMakeLists.txt
new file mode 100644
index 00000000..c569e04f
--- /dev/null
+++ b/data/graphics/CMakeLists.txt
@@ -0,0 +1,5 @@
+ADD_SUBDIRECTORY(gui)
+ADD_SUBDIRECTORY(images)
+ADD_SUBDIRECTORY(items)
+ADD_SUBDIRECTORY(sprites)
+ADD_SUBDIRECTORY(tiles)
diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt
new file mode 100644
index 00000000..59af3fda
--- /dev/null
+++ b/data/graphics/gui/CMakeLists.txt
@@ -0,0 +1,45 @@
+SET (FILES
+ attack_target.png
+ bg_quad_dis.png
+ browserfont.png
+ button.png
+ button_disabled.png
+ buttonhi.png
+ buttonpress.png
+ checkbox.png
+ fixedfont.png
+ hits_blue.png
+ hits_red.png
+ hits_yellow.png
+ hscroll_left_default.png
+ hscroll_left_highlight.png
+ hscroll_left_pressed.png
+ hscroll_right_default.png
+ hscroll_right_highlight.png
+ hscroll_right_pressed.png
+ mouse.png
+ menuitemD.png
+ menuitemF.png
+ menuitemN.png
+ menuitemP.png
+ radioin.png
+ radioout.png
+ selection.png
+ sansserif8.png
+ slider.png
+ deepbox.png
+ thickborder.png
+ vscroll_blue.png
+ vscroll_down_default.png
+ vscroll_down_highlight.png
+ vscroll_down_pressed.png
+ vscroll_grey.png
+ vscroll_red.png
+ vscroll_up_default.png
+ vscroll_up_highlight.png
+ vscroll_up_pressed.png
+ rpgfont_wider.png
+ resize.png
+ )
+
+INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}/graphics/gui)
diff --git a/data/graphics/images/CMakeLists.txt b/data/graphics/images/CMakeLists.txt
new file mode 100644
index 00000000..d406c7b2
--- /dev/null
+++ b/data/graphics/images/CMakeLists.txt
@@ -0,0 +1,16 @@
+ADD_SUBDIRECTORY(ambient)
+
+SET (FILES
+ login_wallpaper.png
+ minimap_new_1-1.png
+ minimap_new_2-1.png
+ minimap_new_3-1.png
+ minimap_new_5-1.png
+ minimap_new_7-1.png
+ minimap_new_9-1.png
+ minimap_new_14-1.png
+ minimap_new_15-1.png
+ minimap_new_16-1.png
+ )
+
+INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}/graphics/images)
diff --git a/data/help/CMakeLists.txt b/data/help/CMakeLists.txt
new file mode 100644
index 00000000..82f61d54
--- /dev/null
+++ b/data/help/CMakeLists.txt
@@ -0,0 +1,12 @@
+SET(FILES
+ about.txt
+ changes.txt
+ commands.txt
+ header.txt
+ index.txt
+ skills.txt
+ support.txt
+ team.txt
+ )
+
+INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}/help)
diff --git a/data/icons/CMakeLists.txt b/data/icons/CMakeLists.txt
new file mode 100644
index 00000000..30d96d86
--- /dev/null
+++ b/data/icons/CMakeLists.txt
@@ -0,0 +1,9 @@
+SET(FILES
+ tmw-icon.ico
+ tmw-icon.png
+ tmw-icon.xpm
+ )
+
+INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}/icons)
+
+INSTALL(FILES "tmw-icon.png" DESTINATION share/pixmaps RENAME tmw.png)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 00000000..3e4550c7
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,303 @@
+FIND_PACKAGE(SDL REQUIRED)
+FIND_PACKAGE(SDL_image REQUIRED)
+FIND_PACKAGE(SDL_mixer REQUIRED)
+FIND_PACKAGE(SDL_net REQUIRED)
+
+FIND_PACKAGE(Libcurl REQUIRED)
+FIND_PACKAGE(LibXml2 REQUIRED)
+FIND_PACKAGE(PhysFS REQUIRED)
+FIND_PACKAGE(PNG REQUIRED)
+
+SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"")
+SET(FLAGS "${FLAGS} -DTMW_DATADIR=\\\"${PKG_DATADIR}/\\\"")
+
+SET(GUICHAN_COMPONENTS "SDL")
+IF (WITH_OPENGL)
+ SET(GUICHAN_COMPONENTS ${GUICHAN_COMPONENTS} "OpenGL")
+ENDIF (WITH_OPENGL)
+FIND_PACKAGE(Guichan REQUIRED ${GUICHAN_COMPONENTS})
+
+IF (WITH_OPENGL)
+ FIND_PACKAGE(OpenGL REQUIRED)
+ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
+ SET(FLAGS "${FLAGS} -DUSE_OPENGL")
+ENDIF (WITH_OPENGL)
+
+INCLUDE_DIRECTORIES(
+ ${CURRENT_SOURCE_DIR}
+ ${SDL_INCLUDE_DIR}
+ ${SDLIMAGE_INCLUDE_DIR}
+ ${SDLMIXER_INCLUDE_DIR}
+ ${SDLNET_INCLUDE_DIR}
+ ${PNG_INCLUDE_DIR}
+ ${PHYSFS_INCLUDE_DIR}
+ ${LIBCURL_INCLUDE_DIR}
+ ${LIBXML2_INCLUDE_DIR}
+ ${GUICHAN_INCLUDE_DIR}
+ )
+
+SET(SRCS
+ graphic/imagerect.h
+ gui/browserbox.cpp
+ gui/browserbox.h
+ gui/buddywindow.cpp
+ gui/buddywindow.h
+ gui/button.cpp
+ gui/button.h
+ gui/buy.cpp
+ gui/buy.h
+ gui/buysell.cpp
+ gui/buysell.h
+ gui/chargedialog.cpp
+ gui/chargedialog.h
+ gui/char_server.cpp
+ gui/char_server.h
+ gui/char_select.cpp
+ gui/char_select.h
+ gui/chat.cpp
+ gui/chat.h
+ gui/chatinput.cpp
+ gui/chatinput.h
+ gui/checkbox.cpp
+ gui/checkbox.h
+ gui/confirm_dialog.cpp
+ gui/confirm_dialog.h
+ gui/connection.cpp
+ gui/connection.h
+ gui/debugwindow.cpp
+ gui/debugwindow.h
+ gui/equipmentwindow.cpp
+ gui/equipmentwindow.h
+ gui/focushandler.cpp
+ gui/focushandler.h
+ gui/gccontainer.cpp
+ gui/gccontainer.h
+ gui/gui.cpp
+ gui/gui.h
+ gui/help.cpp
+ gui/help.h
+ gui/inventorywindow.cpp
+ gui/inventorywindow.h
+ gui/itemcontainer.cpp
+ gui/itemcontainer.h
+ gui/item_amount.cpp
+ gui/item_amount.h
+ gui/linkhandler.h
+ gui/listbox.cpp
+ gui/listbox.h
+ gui/login.cpp
+ gui/login.h
+ gui/menuwindow.cpp
+ gui/menuwindow.h
+ gui/minimap.cpp
+ gui/minimap.h
+ gui/ministatus.cpp
+ gui/ministatus.h
+ gui/newskill.cpp
+ gui/newskill.h
+ gui/npclistdialog.cpp
+ gui/npclistdialog.h
+ gui/npc_text.cpp
+ gui/npc_text.h
+ gui/ok_dialog.cpp
+ gui/ok_dialog.h
+ gui/passwordfield.cpp
+ gui/passwordfield.h
+ gui/playerbox.cpp
+ gui/playerbox.h
+ gui/popupmenu.cpp
+ gui/popupmenu.h
+ gui/progressbar.cpp
+ gui/progressbar.h
+ gui/radiobutton.cpp
+ gui/radiobutton.h
+ gui/register.cpp
+ gui/register.h
+ gui/scrollarea.cpp
+ gui/scrollarea.h
+ gui/selectionlistener.h
+ gui/sell.cpp
+ gui/sell.h
+ gui/setup_audio.cpp
+ gui/setup_audio.h
+ gui/setup.cpp
+ gui/setup.h
+ gui/setup_joystick.cpp
+ gui/setup_joystick.h
+ gui/setuptab.h
+ gui/setup_video.cpp
+ gui/setup_video.h
+ gui/shop.cpp
+ gui/shop.h
+ gui/skill.cpp
+ gui/skill.h
+ gui/slider.cpp
+ gui/slider.h
+ gui/status.cpp
+ gui/status.h
+ gui/tabbedcontainer.cpp
+ gui/tabbedcontainer.h
+ gui/textbox.cpp
+ gui/textbox.h
+ gui/textfield.cpp
+ gui/textfield.h
+ gui/trade.cpp
+ gui/trade.h
+ gui/window.cpp
+ gui/window.h
+ gui/windowcontainer.cpp
+ gui/windowcontainer.h
+ gui/inttextbox.h
+ gui/inttextbox.cpp
+ gui/box.h
+ gui/box.cpp
+ gui/vbox.h
+ gui/vbox.cpp
+ gui/hbox.h
+ gui/hbox.cpp
+ gui/updatewindow.h
+ gui/updatewindow.cpp
+ net/beinghandler.h
+ net/beinghandler.cpp
+ net/buysellhandler.h
+ net/buysellhandler.cpp
+ net/charserverhandler.h
+ net/charserverhandler.cpp
+ net/chathandler.h
+ net/chathandler.cpp
+ net/equipmenthandler.h
+ net/equipmenthandler.cpp
+ net/inventoryhandler.h
+ net/inventoryhandler.cpp
+ net/itemhandler.h
+ net/itemhandler.cpp
+ net/loginhandler.h
+ net/loginhandler.cpp
+ net/maploginhandler.cpp
+ net/maploginhandler.h
+ net/messagehandler.cpp
+ net/messagehandler.h
+ net/messagein.cpp
+ net/messagein.h
+ net/messageout.cpp
+ net/messageout.h
+ net/network.cpp
+ net/network.h
+ net/npchandler.cpp
+ net/npchandler.h
+ net/packet.cpp
+ net/packet.h
+ net/playerhandler.cpp
+ net/playerhandler.h
+ net/protocol.cpp
+ net/protocol.h
+ net/skillhandler.cpp
+ net/skillhandler.h
+ net/tradehandler.cpp
+ net/tradehandler.h
+ resources/ambientoverlay.cpp
+ resources/ambientoverlay.h
+ resources/image.cpp
+ resources/image.h
+ resources/imagewriter.cpp
+ resources/imagewriter.h
+ resources/iteminfo.h
+ resources/iteminfo.cpp
+ resources/itemmanager.cpp
+ resources/itemmanager.h
+ resources/mapreader.cpp
+ resources/mapreader.h
+ resources/music.h
+ resources/music.cpp
+ resources/openglsdlimageloader.h
+ resources/openglsdlimageloader.cpp
+ resources/resource.cpp
+ resources/resource.h
+ resources/resourcemanager.cpp
+ resources/resourcemanager.h
+ resources/sdlimageloader.h
+ resources/sdlimageloader.cpp
+ resources/soundeffect.h
+ resources/soundeffect.cpp
+ resources/spriteset.h
+ resources/spriteset.cpp
+ resources/buddylist.h
+ resources/buddylist.cpp
+ utils/dtor.h
+ utils/tostring.h
+ animatedsprite.cpp
+ animatedsprite.h
+ animation.cpp
+ animation.h
+ base64.cpp
+ base64.h
+ being.cpp
+ being.h
+ beingmanager.cpp
+ beingmanager.h
+ configlistener.h
+ configuration.cpp
+ configuration.h
+ engine.cpp
+ engine.h
+ equipment.cpp
+ equipment.h
+ floor_item.cpp
+ floor_item.h
+ flooritemmanager.cpp
+ flooritemmanager.h
+ game.cpp
+ game.h
+ graphics.cpp
+ graphics.h
+ guichanfwd.h
+ inventory.cpp
+ inventory.h
+ item.cpp
+ item.h
+ joystick.cpp
+ joystick.h
+ localplayer.cpp
+ localplayer.h
+ lockedarray.h
+ log.cpp
+ log.h
+ logindata.h
+ main.cpp
+ main.h
+ map.cpp
+ map.h
+ monster.cpp
+ monster.h
+ npc.cpp
+ npc.h
+ openglgraphics.cpp
+ openglgraphics.h
+ player.cpp
+ player.h
+ properties.h
+ serverinfo.h
+ sound.cpp
+ sound.h
+ sprite.h
+ tileset.h
+ )
+
+ADD_EXECUTABLE(tmw ${SRCS})
+
+TARGET_LINK_LIBRARIES(tmw
+ ${SDL_LIBRARY}
+ ${SDLIMAGE_LIBRARY}
+ ${SDLMIXER_LIBRARY}
+ ${SDLNET_LIBRARY}
+ ${PNG_LIBRARIES}
+ ${PHYSFS_LIBRARY}
+ ${LIBCURL_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${GUICHAN_LIBRARIES}
+ ${OPENGL_LIBRARIES}
+ )
+
+INSTALL(TARGETS tmw RUNTIME DESTINATION ${PKG_BINDIR})
+
+SET_TARGET_PROPERTIES(tmw PROPERTIES COMPILE_FLAGS "${FLAGS}")
diff --git a/src/main.h b/src/main.h
index f8bfb4d9..4aa3fc13 100644
--- a/src/main.h
+++ b/src/main.h
@@ -26,7 +26,7 @@
#include <string>
-#if (defined __USE_UNIX98 || defined __FreeBSD__)
+#ifdef HAVE_CONFIG_H
#include "../config.h"
#elif defined WIN32
#include "../The_Mana_World_private.h"