summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-19 08:14:16 +0000
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-19 08:14:16 +0000
commiteab47c4f2674516d9499e837eff5b6b40f48213d (patch)
tree5d0e59267ca89acef8a491917a3af5ac5afad08f /CMakeLists.txt
parent278d9aa7eb084bd6f93e6ac1fd84033dc316ab5e (diff)
downloadmana-eab47c4f2674516d9499e837eff5b6b40f48213d.tar.gz
mana-eab47c4f2674516d9499e837eff5b6b40f48213d.tar.bz2
mana-eab47c4f2674516d9499e837eff5b6b40f48213d.tar.xz
mana-eab47c4f2674516d9499e837eff5b6b40f48213d.zip
Fixed compile on macOS
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9798acd..cff832e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,6 +50,20 @@ IF (ENABLE_MANASERV)
ADD_SUBDIRECTORY(libs/enet)
ENDIF()
+# On macOS we need to build Guichan ourselves since it is disabled in Homebrew
+# This might also be a good idea for the Windows build
+if(APPLE)
+ # This policy makes sure that the below options are not ignored by the
+ # added Guichan CMakeLists.txt
+ SET(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
+ SET(ENABLE_ALLEGRO OFF)
+ SET(ENABLE_IRRLICHT OFF)
+ SET(ENABLE_SDL OFF)
+ SET(ENABLE_OPENGL OFF)
+ SET(BUILD_GUICHAN_SHARED OFF)
+ ADD_SUBDIRECTORY(libs/guichan)
+endif()
+
ADD_SUBDIRECTORY(src)
IF (GETTEXT_FOUND AND ENABLE_NLS)