summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-06-19Fixed cURL linker issues on MSYS2Thorbjørn Lindeijer1-2/+1
MSYS2 builds cURL 8.8 with CMake, which installs a CURLConfig.cmake file. Since CMake 3.17, the FindCURL module will prefer to return the values from the config file. However, CURLConfig.cmake does not set CURL_LIBRARIES. While a fix for this is pending release (see https://github.com/curl/curl/commit/1dec702c8676fef3a7b5850e5350102876067680), we can rather update to modern CMake by relying on the IMPORTED target CURL::libcurl, which is set since CMake 3.12 (our current minimum required version).
2024-05-07Replaced ENet with submoduleThorbjørn Lindeijer1-8/+11
This also updates ENet from 1.3.2 to 1.3.18. The previously supported WITH_BUNDLEDHEADERS option that affected which ENet was being used has now been reversed and renamed to USE_SYSTEM_ENET, which defaults to OFF for now.
2024-04-20CMake: Use FindIntlThorbjørn Lindeijer1-19/+8
FindIntl was added with CMake 3.2 and can be used to find the Gettext libintl headers and libraries. I've removed special handling of Solaris, which explicitly added linking to 'intl' and added '/usr/local/lib' include path. It can be easily restored if necessary, once somebody tries to compile Mana on Solaris.
2024-04-20CMake: Use add_compile_definitions instead of setting COMPILE_FLAGSThorbjørn Lindeijer1-21/+12
This is supported since CMake 3.12 (current minimum) and simplifies the whole quoting business. Also used a generator expression to set the DEBUG define conditionally. At the same time, DEBUG is no longer defined in RelWithDebInfo builds, but it shouldn't be.
2024-04-20CMake: Use cmake-format to make the files more pleasant to readThorbjørn Lindeijer1-129/+134
More consistent formatting and no longer everything in uppercase, yay!
2024-04-20CMake: Removed unused PROGRAMS variableThorbjørn Lindeijer1-2/+0
A leftover from 86522166e082b2defaea541747ecdce0f1149fe5.
2024-04-17macOS: Create an app bundleThorbjørn Lindeijer1-15/+35
Also enable using `cpack -G DragNDrop` to create a DMG to easily drag Mana into the Applications folder. The DMG is also available as a CI artifact. The minimum deployment target has been set to 10.15, as required due to usage of std::filesystem::create_directories.
2024-04-12CMake: Use GNUInstallDirsThorbjørn Lindeijer1-2/+8
This should make CMake options a little more standardized. The Windows part could potentially still be unified further. Absolute paths are now only used for the defines and not for values going to install() commands.
2024-04-08CMake: Removed manual RC-compiler setup for MinGWThorbjørn Lindeijer1-16/+0
Works without in MSYS2, at least.
2024-04-08Resolved issues with winver.hThorbjørn Lindeijer1-1/+2
The configured file wasn't actually being used, because it was not in the include path. Instead, a checked in version was used. In addition, winver.h is an existing Windows header, which was conflicting with the generated file. Instead, now mana.rc itself is configured. We didn't actually need winver.h anywhere else, anyway.
2024-03-26CMake: Added USE_SYSTEM_GUICHAN optionThorbjørn Lindeijer1-16/+14
So that one can choose to build with the Guichan submodule also on other systems than macOS.
2024-03-25Allow mouse focus click-throughThorbjørn Lindeijer1-1/+1
This is generally expected on Linux, where it feels annoying that the initial click just focuses the window. On macOS it's a little bit different, since applications can be specific about which elements are directly clickable and which aren't, but in general it feels better to me when the UI can be interacted with directly.
2024-03-08Removed SDL2_gfx dependencyThorbjørn Lindeijer1-1/+1
Since the upgrade to SDL2 it was only used for framerate limiting, which I've replicated in a small helper class. Also reduced the framerate limit while minimized from 100 to 10 FPS.
2024-02-27Added VSync and windowed fullscreen optionsThorbjørn Lindeijer1-4/+8
The configuration and setup UI were adjusted to the new options. This also fixes issues in applying new video settings. Default resolution was changed from 800x600 to 1280x720. VSync is enabled by default while FPS limit was disabled. Display aspect ratio for the resolution options. I had to work around some macOS issues: * Don't change window size when it appears to be "maximized", since it just changes the rendering area while leaving the window maximized. * Unset fullscreen display mode temporarily to allow changing resolutions, otherwise the rendering area no longer matches the screen and mouse input is also off. * Removed SDL_WINDOW_ALLOW_HIGHDPI for now because it causes issues on macOS, since we're not actually handling the scaling factor. A Video class and an SDLGraphics subclass were split off from Graphics. This setup has Less duplication and leaves the OpenGLGraphics and SDLGraphics better separated. Fixes #57 Fixes #58
2024-02-19Fixed compile on macOSThorbjørn Lindeijer1-11/+15
Since Guichan is currently disabled on Homebrew, I've opted for adding it as a submodule instead. It currently references the 0.8 branch of Guichan, after I cherry-picked the CMake support from the master branch. When using SDL2 installed through Homebrew, it was necessary to use SDL2_LINK_LIBRARIES, since the libraries occupy various different directories. It no longer seems necessary to include an SDLMain.m, so I deleted it. Removed obsolete OS X instructions. Also added instructions for installing dependencies on Fedora. Removed mentioning of /announce and /who in the README, since they were removed for tmwAthena.
2024-02-13Reverted the PhysicsFS check for Ubuntu 18.04 compatibilityThorbjørn Lindeijer1-2/+2
Apparently, pkg-config files for physfs were not shipping yet in Ubuntu 18.04. Now it no longer checks that we have at least physfs 3.0, but older versions should be pretty rare anyway. This reverts part of ffa8ea13fbf50ad59d9fc4cea71b9aec4aca8bac.
2024-02-07Introduce .gitlab-ci.ymlThorbjørn Lindeijer1-2/+1
This just checks that the client compiles on Ubuntu for now. Also fixed a PhysicsFS linker issue introduced in ffa8ea13fbf50ad59d9fc4cea71b9aec4aca8bac...
2024-02-05Use SDL2 to show a simple message box on errorThorbjørn Lindeijer1-1/+0
Replacing the various OS-specific ways implemented for macOS, Windows and Linux (based on xmessage).
2024-02-05Require PhysFS 3.0Thorbjørn Lindeijer1-21/+2
It seems the implementation of PhysicsFS RWops shipped requires a somewhat up-to-date PhysFS (beyond just a missing PHYSFS_DECL macro). Also simplified CMake files somewhat, enabling new behavior for some policies that were triggering warnings. And removed the no longer used FindSDL_gfx.cmake module (SDL_gfx is found using pkg-config since 2c51c98625b225cecfb9628c30d62d4e30f7e3e1).
2024-01-25Always use C++11 and remove related compatibility option/codeThorbjørn Lindeijer1-5/+0
2024-01-25Removed X11 dependencyThorbjørn Lindeijer1-6/+0
It was only used for the clipboard, which is now interacted with through SDL 2.
2024-01-25Ported to SDL2Thorbjørn Lindeijer1-33/+20
2013-05-04Client-side settings are now available from settings.xmlPrzemysław Grzywacz1-0/+4
2013-04-27Added support for charcreation.xml settingsThorbjørn Lindeijer1-0/+2
This file was introduced by ManaPlus as a way of configuring the character creation process. It defines the number of hair styles and colors, how stat points should be divided and what the starting equipment of the player is. The minimum and maximum hair color/style IDs are not supported at the moment. This is mostly a backport of ManaPlus commits 10cf52b5 and dcc18eba, with some style changes. Mantis-issue: 501 Reviewed-by: Ablu
2013-04-27Always read the attributes.xml fileThorbjørn Lindeijer1-2/+2
This way it can also be used when connecting to a tmwAthena server for customizing the min/max of attributes and the amount of starting points. Mantis-issue: 501 Reviewed-by: Ablu
2012-08-14Can now build using cmake on OSXSocapex1-1/+10
Tested-by: Frost.
2012-08-12Removed ImageLoader and ProxyImage classesThorbjørn Lindeijer1-2/+0
They allowed using gcn::Image, which in turns allows using gcn::Icon and gcn::ImageFont, but none of this is actually used anymore. Reviewed-by: Erik Schilling
2012-06-26don't overwrite system/environment CXXFLAGShasufell1-1/+1
Reviewed-by: Ablu.
2012-05-05Removed the shared base classes of MessageIn and MessageOutThorbjørn Lindeijer1-4/+0
There wasn't a whole lot gained by sharing a common base class, and it makes extending the manaserv Message{In,Out} classes with a debugging mode unnecessarily complicated. Reviewed-by: Yohann Ferreira
2012-03-24Introduced compile-time option to disable use of C++0xThorbjørn Lindeijer1-1/+5
This is in order to still support older compilers, in particular GCC 4.2.1, so that Mana may be compiled for Maemo 5. Reviewed-by: Yohann Ferreira
2012-02-07Added cmake status messages on compile options used.Yohann Ferreira1-0/+4
Reviewed-by: Erik Schilling
2012-01-24Use SDL_RWops directly on top of PhysFSThorbjørn Lindeijer1-0/+2
This avoids the creation of a temporary buffer containing a complete file for the sole purpose of wrapping it up in an SDL_RWops. The necessary wrapper is by Ryan C. Gordon and is included in the PhysFS repository under 'extras'. Reviewed-by: Yohann Ferreira
2012-01-18ColorDB -> HairDB.Yohann Ferreira1-2/+2
This will ease the reading of the next patch about hair handling at character creation time in tAthena. As requested by bjorn. Reviewed-by: bjorn
2012-01-16Renamed some file names for consistency with the class namesThorbjørn Lindeijer1-22/+22
This was already done by ManaPlus. It's a good idea anyway and it makes comparing the code a little easier. Reviewed-by: Yohann Ferreira
2012-01-10Made addition of custom servers be done in a separate window.Yohann Ferreira1-0/+2
Now the first window the user can see is a list of servers which can double-clicked, making it all less cluttered. This commit also makes custom servers able to now have their own titles and their own description, just as the official ones. I also fixed the add entry button being registered twice to the action listener, and the fact that the description wasn't updated properly at windows loading and when adding/removing an entry. Resolves: Mana-Mantis #237. Reviewed-by: Ablu
2011-09-08Merge remote-tracking branch 'origin/0.5'Ben Longbons1-0/+1
2011-09-07Changes need to build without OpenGLBen Longbons1-0/+1
2011-06-03Replace SDL_types.h with cstdintJared Adams1-0/+1
This required moving to C++0x, so it does that too, and fixes a few errors with that. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2011-05-24Extended Guichan with an empty spacer widgetAngelo Castellani1-0/+2
Useful for making nicer layouts Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-05-24Widened the setup window by 5pxAngelo Castellani1-2/+2
To make room for the interface tab Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-05-24Broke the setup tab "Video" in twoAngelo Castellani1-0/+2
Added an 'Interface' tab for the items that seemed to fit better there than in 'Video'. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-04-09Renamed Listener to EventListenerThorbjørn Lindeijer1-2/+2
Makes it clear what kind of listener it is, since there are other listener classes as well. Acked-by: Jared Adams
2011-02-15Fix compilation on Haiku and set config and data paths for it.DarkWind1-1/+1
2011-02-01Merge branch '0.5'Thorbjørn Lindeijer1-5/+16
Conflicts: po/de.po src/game.cpp src/resources/wallpaper.cpp
2011-01-28Fix Windows build of the 0.5 version.Yohann Ferreira1-2/+2
The rc and specialfolders files where included with the manaserv specific files.
2011-01-26Prune the enet and manaserv files dependency of the 0.5 binary.Yohann Ferreira1-5/+16
Only using cmake conditions and an ifdef. This will greatly help packaging the mana 0.5 version on other distros.
2010-12-30Renamed protocol.h to manaserv_protocol.h to follow server's changes.Yohann Ferreira1-1/+1
I'll sync the two files as for the new enums in a separate commit. Trivial fix. Resolves: Mana-mantis #278.
2010-12-22Merge branch '0.5'Chuck Miller1-2/+0
2010-12-22Remove ambientoverlay class and filesChuck Miller1-2/+0
It was renamed and duplicated to "ambientlayer"
2010-11-15Remove the configlistener.h from the file listChuck Miller1-1/+0
Trivial fix