From eab47c4f2674516d9499e837eff5b6b40f48213d Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 19 Feb 2024 08:14:16 +0000 Subject: 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. --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3-70-g09d2