FIND_PACKAGE(SDL REQUIRED) FIND_PACKAGE(SDL_image REQUIRED) FIND_PACKAGE(SDL_mixer REQUIRED) FIND_PACKAGE(SDL_ttf REQUIRED) FIND_PACKAGE(ENet REQUIRED) FIND_PACKAGE(CURL 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} ${SDLTTF_INCLUDE_DIR} ${ENET_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${PHYSFS_INCLUDE_DIR} ${CURL_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} ${GUICHAN_INCLUDE_DIR} ) # Fix some stuff that gets not hidden by mainline modules MARK_AS_ADVANCED(PHYSFS_INCLUDE_DIR) MARK_AS_ADVANCED(PHYSFS_LIBRARY) MARK_AS_ADVANCED(SDLIMAGE_INCLUDE_DIR) MARK_AS_ADVANCED(SDLIMAGE_LIBRARY) MARK_AS_ADVANCED(SDLMAIN_LIBRARY) MARK_AS_ADVANCED(SDLMIXER_INCLUDE_DIR) MARK_AS_ADVANCED(SDLMIXER_LIBRARY) MARK_AS_ADVANCED(SDL_INCLUDE_DIR) MARK_AS_ADVANCED(SDL_LIBRARY) SET(SRCS gui/widgets/dropdown.cpp gui/widgets/dropdown.h gui/widgets/resizegrip.cpp gui/widgets/resizegrip.h gui/widgets/layout.cpp gui/widgets/layout.h gui/widgets/tab.cpp gui/widgets/tab.h gui/widgets/tabbedarea.cpp gui/widgets/tabbedarea.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/changeemaildialog.cpp gui/changeemaildialog.h gui/changepassworddialog.cpp gui/changepassworddialog.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/guildlistbox.cpp gui/guildlistbox.h gui/guildwindow.cpp gui/guildwindow.h gui/hbox.cpp gui/hbox.h gui/help.cpp gui/help.h gui/icon.cpp gui/icon.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/itempopup.cpp gui/itempopup.h gui/itemshortcutcontainer.cpp gui/itemshortcutcontainer.h gui/itemshortcutwindow.cpp gui/itemshortcutwindow.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/partywindow.h gui/partywindow.cpp 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/quitdialog.cpp gui/quitdialog.h gui/radiobutton.cpp gui/radiobutton.h gui/register.cpp gui/register.h gui/scrollarea.cpp gui/scrollarea.h gui/sdlinput.cpp gui/sdlinput.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/setup_keyboard.cpp gui/setup_keyboard.h gui/setuptab.h gui/setup_video.cpp gui/setup_video.h gui/shop.cpp gui/shop.h gui/shoplistbox.cpp gui/shoplistbox.h gui/skill.cpp gui/skill.h gui/slider.cpp gui/slider.h gui/speechbubble.cpp gui/speechbubble.h gui/status.cpp gui/status.h gui/textbox.cpp gui/textbox.h gui/textdialog.cpp gui/textdialog.h gui/textfield.cpp gui/textfield.h gui/trade.cpp gui/trade.h gui/truetypefont.cpp gui/truetypefont.h gui/unregisterdialog.cpp gui/unregisterdialog.h gui/updatewindow.cpp gui/updatewindow.h gui/vbox.cpp gui/vbox.h gui/viewport.cpp gui/viewport.h gui/window.cpp gui/window.h gui/windowcontainer.cpp gui/windowcontainer.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/connection.cpp net/connection.h net/guildhandler.cpp net/guildhandler.h net/internal.cpp net/internal.h net/inventoryhandler.cpp net/inventoryhandler.h net/itemhandler.cpp net/itemhandler.h net/loginhandler.cpp net/loginhandler.h net/logouthandler.cpp net/logouthandler.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/partyhandler.cpp net/partyhandler.h net/playerhandler.cpp net/playerhandler.h net/posthandler.cpp net/posthandler.h net/protocol.h net/tradehandler.cpp net/tradehandler.h net/effecthandler.cpp net/effecthandler.h net/accountserver/account.cpp net/accountserver/account.h net/accountserver/accountserver.cpp net/accountserver/accountserver.h net/accountserver/internal.cpp net/accountserver/internal.h net/chatserver/chatserver.cpp net/chatserver/chatserver.h net/chatserver/guild.cpp net/chatserver/guild.h net/chatserver/internal.cpp net/chatserver/internal.h net/chatserver/party.cpp net/chatserver/party.h net/gameserver/gameserver.cpp net/gameserver/gameserver.h net/gameserver/internal.cpp net/gameserver/internal.h net/gameserver/player.cpp net/gameserver/player.h resources/action.cpp resources/action.h resources/ambientoverlay.cpp resources/ambientoverlay.h resources/animation.cpp resources/animation.h resources/buddylist.cpp resources/buddylist.h resources/dye.cpp resources/dye.h resources/image.cpp resources/image.h resources/imageloader.cpp resources/imageloader.h resources/imageset.h resources/imageset.cpp resources/imagewriter.cpp resources/imagewriter.h resources/itemdb.cpp resources/itemdb.h resources/iteminfo.cpp resources/iteminfo.h resources/mapreader.cpp resources/mapreader.h resources/monsterdb.cpp resources/monsterdb.h resources/monsterinfo.cpp resources/monsterinfo.h resources/music.cpp resources/music.h resources/npcdb.cpp resources/npcdb.h resources/resource.cpp resources/resource.h resources/resourcemanager.cpp resources/resourcemanager.h resources/soundeffect.cpp resources/soundeffect.h resources/spritedef.h resources/spritedef.cpp utils/base64.cpp utils/base64.h utils/dtor.h utils/fastsqrt.h utils/gettext.h utils/minmax.h utils/sha256.h utils/sha256.cpp utils/strprintf.cpp utils/strprintf.h utils/tostring.h utils/trim.h utils/xml.cpp utils/xml.h animatedsprite.cpp animatedsprite.h animationparticle.cpp animationparticle.h being.cpp being.h beingmanager.cpp beingmanager.h channel.cpp channel.h channelmanager.cpp channelmanager.h commandhandler.cpp commandhandler.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 guild.cpp guild.h imageparticle.cpp imageparticle.h inventory.cpp inventory.h item.cpp item.h itemshortcut.cpp itemshortcut.h joystick.cpp joystick.h keyboardconfig.cpp keyboardconfig.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 particle.cpp particle.h particleemitter.cpp particleemitter.h player.cpp player.h position.cpp position.h properties.h serverinfo.h shopitem.cpp shopitem.h simpleanimation.cpp simpleanimation.h sound.cpp sound.h sprite.h textparticle.cpp textparticle.h tileset.h vector.cpp vector.h effectmanager.cpp effectmanager.h ) ADD_EXECUTABLE(tmw ${SRCS}) TARGET_LINK_LIBRARIES(tmw ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} ${ENET_LIBRARIES} ${PNG_LIBRARIES} ${PHYSFS_LIBRARY} ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} ${GUICHAN_LIBRARIES} ${OPENGL_LIBRARIES} ) INSTALL(TARGETS tmw RUNTIME DESTINATION ${PKG_BINDIR}) SET_TARGET_PROPERTIES(tmw PROPERTIES COMPILE_FLAGS "${FLAGS}")