diff options
-rw-r--r-- | CMake/Modules/FindENet.cmake | 41 | ||||
-rw-r--r-- | CMake/Modules/FindGuichan.cmake | 97 | ||||
-rw-r--r-- | CMake/Modules/FindLibXml2.cmake | 59 | ||||
-rw-r--r-- | CMake/Modules/FindLibcurl.cmake | 41 | ||||
-rw-r--r-- | CMakeLists.txt | 21 | ||||
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | data/CMakeLists.txt | 13 | ||||
-rw-r--r-- | data/graphics/CMakeLists.txt | 5 | ||||
-rw-r--r-- | data/graphics/gui/CMakeLists.txt | 45 | ||||
-rw-r--r-- | data/graphics/images/CMakeLists.txt | 16 | ||||
-rw-r--r-- | data/help/CMakeLists.txt | 12 | ||||
-rw-r--r-- | data/icons/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/CMakeLists.txt | 299 | ||||
-rw-r--r-- | src/main.h | 2 |
14 files changed, 672 insertions, 1 deletions
diff --git a/CMake/Modules/FindENet.cmake b/CMake/Modules/FindENet.cmake new file mode 100644 index 00000000..4d0a06c8 --- /dev/null +++ b/CMake/Modules/FindENet.cmake @@ -0,0 +1,41 @@ +# - Try to find enet +# Once done this will define +# +# ENET_FOUND - system has enet +# ENET_INCLUDE_DIR - the enet include directory +# ENET_LIBRARIES - the libraries needed to use enet +# ENET_DEFINITIONS - Compiler switches required for using enet + +IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) + SET(ENet_FIND_QUIETLY TRUE) +ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) + +FIND_PATH(ENet_INCLUDE_DIR enet/enet.h + /usr/include + /usr/local/include + ) + +FIND_LIBRARY(ENet_LIBRARY + NAMES enet + PATHS /usr/lib /usr/local/lib + ) + +IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) + SET(ENET_FOUND TRUE) + SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR}) + SET(ENET_LIBRARIES ${ENet_LIBRARY}) +ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY) + SET(ENET_FOUND TRUE) +ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) + +IF (ENET_FOUND) + IF (NOT ENet_FIND_QUIETLY) + MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}") + ENDIF (NOT ENet_FIND_QUIETLY) +ELSE (ENET_FOUND) + IF (ENet_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find enet") + ENDIF (ENet_FIND_REQUIRED) +ENDIF (ENET_FOUND) + +MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY) 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..0d123870 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,21 @@ +PROJECT(TMW) + +SET(VERSION 0.1.0) + +# 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) @@ -1,3 +1,16 @@ +2006-11-01 Björn Steinbrink <B.Steinbrink@gmx.de> + + * CMake/Modules/FindLibXml2.cmake, CMake/Modules/FindENet.cmake, + CMake/Modules/FindLibcurl.cmake, CMake/Modules/FindGuichan.cmake, + src/CMakeLists.txt, src/main.h, 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: Added CMake support. + 2006-09-28 Björn Steinbrink <B.Steinbrink@gmx.de> * src/map.cpp: Fix random crashes when map tiles are missing. 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..87585226 --- /dev/null +++ b/data/graphics/gui/CMakeLists.txt @@ -0,0 +1,45 @@ +SET (FILES + attack_target.png + bg_quad_dis.png + browserfont.png + button_disabled.png + buttonhi.png + button.png + buttonpress.png + checkbox.png + deepbox.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 + menuitemD.png + menuitemF.png + menuitemN.png + menuitemP.png + mouse.png + radioin.png + radioout.png + resize.png + rpgfont_wider.png + sansserif8.png + selection.png + slider.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 + ) + +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..471d4c92 --- /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_14-1.png + minimap_new_15-1.png + minimap_new_16-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 + ) + +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..b3bf323e --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,299 @@ +FIND_PACKAGE(SDL REQUIRED) +FIND_PACKAGE(SDL_image REQUIRED) +FIND_PACKAGE(SDL_mixer REQUIRED) +FIND_PACKAGE(ENet 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} + ${ENET_INCLUDE_DIR} + ${PNG_INCLUDE_DIR} + ${PHYSFS_INCLUDE_DIR} + ${LIBCURL_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${GUICHAN_INCLUDE_DIR} + ) + +SET(SRCS + graphic/imagerect.h + gui/box.cpp + gui/box.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_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/hbox.cpp + gui/hbox.h + gui/help.cpp + gui/help.h + gui/inttextbox.cpp + gui/inttextbox.h + gui/inventorywindow.cpp + gui/inventorywindow.h + gui/item_amount.cpp + gui/item_amount.h + gui/itemcontainer.cpp + gui/itemcontainer.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/serverdialog.cpp + gui/serverdialog.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/updatewindow.cpp + gui/updatewindow.h + gui/vbox.cpp + gui/vbox.h + gui/windowcontainer.cpp + gui/windowcontainer.h + gui/window.cpp + gui/window.h + gui/widgets/dropdown.cpp + gui/widgets/dropdown.h + net/beinghandler.cpp + net/beinghandler.h + net/buysellhandler.cpp + net/buysellhandler.h + net/charserverhandler.cpp + net/charserverhandler.h + net/chathandler.cpp + net/chathandler.h + net/equipmenthandler.cpp + net/equipmenthandler.h + net/inventoryhandler.cpp + net/inventoryhandler.h + net/itemhandler.cpp + net/itemhandler.h + net/loginhandler.cpp + net/loginhandler.h + 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/playerhandler.cpp + net/playerhandler.h + net/protocol.h + net/skillhandler.cpp + net/skillhandler.h + net/tradehandler.cpp + net/tradehandler.h + resources/buddylist.cpp + resources/buddylist.h + resources/image.cpp + resources/image.h + resources/imagewriter.cpp + resources/imagewriter.h + resources/iteminfo.cpp + resources/iteminfo.h + resources/itemmanager.cpp + resources/itemmanager.h + resources/mapreader.cpp + resources/mapreader.h + resources/music.cpp + resources/music.h + resources/openglsdlimageloader.cpp + resources/openglsdlimageloader.h + resources/resource.cpp + resources/resource.h + resources/resourcemanager.cpp + resources/resourcemanager.h + resources/sdlimageloader.cpp + resources/sdlimageloader.h + resources/soundeffect.cpp + resources/soundeffect.h + resources/spriteset.cpp + resources/spriteset.h + 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} + ${ENET_LIBRARIES} + ${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}") @@ -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" |