Commit graph

389 commits

Author SHA1 Message Date
Pentarctagon
e55e4a6d60 Make cmake's Release and Debug builds match scons
Let cmake use its default -O3 again

m4
2016-11-18 01:27:40 -06:00
Gregory A Lundberg
f23127e65a Remove LOW_MEM compile-time option
Per @Vultraz
2016-11-11 09:20:56 -06:00
Gregory A Lundberg
0ecbbef033 Apply patch to boost
When using:

    scons strict=true ctool=clang

A number of issues appear concerning a known bug in Boost::Bind; applying the patch which should appear in Boost 1.63. Comments on the Boost ticket indicate this may also be an issue for earlier versions of GCC.

For the ticket, see

    https://svn.boost.org/trac/boost/ticket/12397

and the patch is at

    3c56630b54

NOTE: This does NOT create a dependency upon the patched header. If the header is changed, you must do a full re-build of all sources by hand.
2016-10-16 10:55:09 -05:00
Gregory A Lundberg
34dcd0657f Test for Travis and only require SDL 2.0.2 2016-10-16 03:36:57 -05:00
Gregory A Lundberg
907eb5bf7e Require SDL2 2.0.4 on all target platforms. 2016-10-16 00:55:24 -05:00
Ignacio R. Morelle
7e1798f342 cmake: Drop ENABLE_SDL_GPU option
The code conditionals using SDL_gpu in the source tree are unmaintained
and likely broken. From past discussions with vultraz and Aginor, the
plan ahead is to completely drop SDL_gpu and its support code once
there's no risk of conflict with certain WIP branches.
2016-10-03 07:23:12 -03:00
Ignacio R. Morelle
2c5904ae0a cmake: Remove ENABLE_PANDORA option
Pretty much all of the code for supporting OpenPandora is gone from the
source tree, and the last two mentions have just been slated for
removal, so it's effectively dead.
2016-10-03 07:19:21 -03:00
Ignacio R. Morelle
8b341411d6 cmake: Remove SDL_net-related checks and substitutions 2016-10-03 06:59:48 -03:00
loonycyborg
0f9e04501f Remove obsolete and unused HAVE_CXX0X macro from buildsystems 2016-06-01 22:14:09 +03:00
Andreas
94fc73fcde Merge pull request #551 from starius/respect-user-cmake-module-path
respect CMAKE_MODULE_PATH provided by user
2016-04-10 14:55:28 +12:00
Nils Kneuper
f758706ea2 fixed compiling with CMake in a hacky way
* Switched from C++98 to C++11 (as announced on the dev-ml)
* Added support for boost-thread

The current implementation is hacky and not clean. It at least builds on
my gentoo ~amd64 system.
2016-04-02 10:15:54 +02:00
Andreas Löf
5c6e7c7d20 Remove SDL1 from SCons and CMake
This makes SDL2 the only build alternative for Wesnoth. Any
conditionals are removed, leaving only the settings that rely on SDL2.
2016-03-13 11:34:29 +13:00
Andreas Löf
9b5870e14b Correct SDL2 versions for linux/win32/osx in build scripts
Codify the requirements set forth in the INSTALL file in scons and
cmake as they are used on other platforms that Linux and * BSD.
2016-01-17 10:41:36 +13:00
Andreas Löf
9ed01599ee Drop requiered SDL2 version to 2.0.2 on Linux and *BSD
This drops the required version to 2.0.2 on Linux and *BSD, as there are no known bugs that require us to have a later version on these platforms. Windows and Os X remains as 2.0.4.
2016-01-17 09:28:18 +13:00
Andreas Löf
4650202390 Update build requirements to SDL 2.0.4 2016-01-17 08:26:14 +13:00
Boris Nagaev
6e08864345 respect CMAKE_MODULE_PATH provided by user
Cross-compiling to Windows with MXE [1] requires providing custom
CMAKE_MODULE_PATH variable for CMake:

$ cmake -DCMAKE_MODULE_PATH=/file/provided/by/mxe.cmake

As Wesnoth's CMakeLists.txt resets CMAKE_MODULE_PATH, the effect of
CMAKE_MODULE_PATH provided by MXE is disabled and the build fails
with linking errors [2].

This commit changes CMakeLists.txt to respect the value of
user provided CMAKE_MODULE_PATH, so both MXE and Wesnoth
customizations of CMake variables are applied.

[1] http://mxe.cc/
[2] https://gist.github.com/starius/abfb9033d92f21ef521d
2015-11-08 14:56:28 +03:00
Andreas Löf
1890e948e4 Merge branch 'master' into sdl2 2015-10-26 18:57:32 +13:00
Ignacio R. Morelle
03a85fde56 cmake: Tests and tools also need Boost.Filesystem + Boost.Locale
Fixes linker errors found when building after configuring with
`-DENABLE_TOOLS=ON -DENABLE_GAME=OFF -DENABLE_SERVER=OFF
-DENABLE_NLS=OFF`.
2015-10-19 21:46:44 -03:00
Andreas Löf
e8c3e99dad Make SDL2 the default in cmake and scons
This changes the default settings in the cmake and scons to make all
targets be compiled with SDL2 as opposed to SDL1.
2015-09-15 20:45:27 +12:00
Andreas Löf
c5bec31dae Change the ordering of the CMakeLists so options comes first.
This changes the ordering of the compile time options so the options
comes before any before any flags or checks that may depend on them.
2015-09-09 21:42:29 +12:00
Andreas Löf
4c4c469ead Add SDL2 support to the CMake.
To compile with SDL2, run with -DENABLE_SDL2=TRUE. SDL2 is disabled by default.
2015-08-17 03:40:22 +12:00
Charles Dang
7923a41663 cmake: drop reference to standalone editor icon and .desktop files
These were removed in 176bda844c.
2015-07-30 13:09:51 +11:00
Ignacio R. Morelle
24a166db22 cmake: Disable strict compilation by default
It's no good for users who are likely to hit issues with compilers not
used by the release team.
2015-06-26 23:09:18 -03:00
Ignacio R. Morelle
35fdff6622 Remove ANA
This project was never completed, the author left, and what we had was
too buggy to use in production (including such gems as a server DoS
bug).

Only removed from the CMake recipe since it was already removed from the
SCons script in commit 634b0039f8.
2015-04-23 06:08:40 -03:00
Ignacio R. Morelle
cfbeee2f50 cmake: Add ENABLE_HISTORY option
For enabling history expansion support in the Lua console. Uses GNU
libhistory.
2015-04-13 04:30:57 -03:00
Ignacio R. Morelle
1dd02d7b18 cmake: Fix typo in the SDL_gpu option's description 2015-04-13 03:53:06 -03:00
Ignacio R. Morelle
135bcf15d6 cmake: Add ENABLE_LIBINTL option to use libintl instead of Boost.Locale
This also makes it so libintl isn't mandatory when this option isn't
enabled anymore.

Additionally, the BFS and Boost.Locale checks are now properly shared
between ENABLE_SERVER and ENABLE_GAME configurations without duplicating
code in the CMake recipe.
2015-04-13 03:44:23 -03:00
Nils Kneuper
76c6cc1de3 switch to better way finding FriBiDi in cmake
* FriBiDi can be found using pkgconfig, switch to using it instead of
  using our homegrown FindFriBiDi.cmake file for finding it in cmake
* had to set some extra "do not consider these warnings" for font.cpp,
  is this really no issue for scons for strict compilation with -Wall?
2015-04-12 15:12:29 +02:00
Nils Kneuper
05d6e7dd9b remove option to use ancient FriBiDi 2015-04-12 13:23:54 +02:00
Nils Kneuper
2d1e0804aa enforce cmake default build type (bug #23445)
If no build type is selected it can happen that the game builds without
any optimization. Now the user has to explicitly specify the 'none' type
if they want it.
2015-04-12 11:53:19 +02:00
Nils Kneuper
7513477224 remove most OpenPandora specific items
The only thing that the ENABLE_PANDORA flag does now is to allow the
resolution of 800x480 and using a special theme automatically.
Everything else is 100% "mainline code". This means if someone wants to
package for pandora several system libraries will have to be
handcompiled and shipped in the pnd including:
* >=boost 1.48 (at least one component (locale) requires this)
* >=SDL_mixer 1.2.12
* VorbisFile
2015-04-12 11:07:37 +02:00
Ignacio R. Morelle
fe64aa9fda cmake: Remove ENABLE_BOOST_FILESYSTEM option
See commit c62d53239c for the SCons
counterpart.

This does *not* remove the ENABLE_PANDORA config-time requirement
exceptions, which we need to decide on before releasing 1.13.0.
2015-04-11 23:47:03 -03:00
Nils Kneuper
433fde99a1 fixed building wesnothd without game
thanks mr_bones_ for reporting the issue
2015-01-20 08:07:39 +01:00
Ignacio R. Morelle
7db1de5421 cmake: Replace another bogus check for MSVC with WIN32
Otherwise attempting to compile with any other compiler targeting Win32
results in build errors with the Lua code, unless (presumably) you are
targeting Cygwin or another full POSIX implementation on Win32.
2014-12-16 04:38:33 -03:00
Mark de Wever
5a30942c5e Fix compilation with notifications disabled.
In CMake the notifications are enabled by default, switching them to
disabled didn't clear the LIBDBUS_FOUND flag properly causing the
the compilation to fail due to the #error in
src/desktop/dbus_notification.cpp.
2014-11-23 14:22:37 +01:00
Chris Beck
93326f2a6e comment out "history" feature which doesn't work in cmake right now 2014-11-22 23:32:12 -05:00
Chris Beck
aedb0dce33 lua console history feature uses "history" instead of "readline"
This is the correct and more minimal interpretation of the optional
dependency.
2014-11-22 21:56:27 -05:00
Chris Beck
2152b48a14 scons, cmake: by default, search for GNU readline support 2014-11-22 00:03:30 -05:00
Chris Beck
ba46cc80b1 add command history and history expansion to lua console
Adds an optional dependency on the readline library.
2014-11-21 21:08:47 -05:00
Chris Beck
da4074e882 use boost mersenne twister rng, add boost::random dependency
This is a squash of work done in april, see closed github pull
request. #160
2014-11-03 11:24:24 -05:00
Nils Kneuper
c25de4bd87 apply fixes for building the pandora port with cmake to master 2014-11-02 23:54:16 +01:00
Boldizsár Lipka
7ed5bb1a6e Fix CMake build. 2014-11-01 15:56:11 +01:00
Chris Beck
22b7a3932e Merge branch 'save_png'
Conflicts:
	CMakeLists.txt
2014-10-31 09:00:26 -04:00
Chris Beck
cef5e2ed9c for cmake + ENABLE_PANDORA, reduce SDL_mixer dep to 1.2 from 1.2.12 2014-10-25 19:27:58 -04:00
Chris Beck
419f154f42 in cmake, make PANDORA option force the BFS option to false 2014-10-25 19:23:28 -04:00
Chris Beck
bdd109ebcb Fixup boost filesystem options for cmake, scons
The option should control the compilation, in wesnoth-core, of
filesystem_boost.cpp, and gettext_boost.cpp, vs. the old versions.

Using the new code is now the default option, you must explicitly
deactivate with both cmake and scons to get the old stuff back.
2014-10-25 18:53:43 -04:00
Chris Beck
8dfdc6b185 add SDL_SavePNG, write files as png if possible, unless ending .bmp
This commit adds a "minimal interface to lib png to support writing
png files from SDL surfaces", to the codebase. It adds a save_image
function to namespace image, and this checks compiler flags to see
if lib png is available. The function will save as a png if png
support is included and save file name doesn't have bmp extension,
and otherwise it will save as a BMP as usual.

We already had lib png as a dependency to build the tools, just not
the main game. This commit changes cmake and scons but makes the
dependency only optional, changing nothing if lib png is not
available.

See here: https://github.com/driedfruit/SDL_SavePNG
2014-10-22 21:34:38 -04:00
Alexander van Gessel
ab9baacf6e Change SDL resource loading to use our filesystem functions
SDL 1.2's own filesystem functions have very limited unicode support,
so provide an SDL_RWops struct to let them use ours.
This also bumps the minimum required SDL_mixer version to 1.2.12

Conflicts:
	SConstruct
	src/filesystem.hpp
2014-10-17 16:15:09 -04:00
Boldizsár Lipka
c2d7265718 Make SDL_gpu an optional dependency. 2014-07-01 20:39:17 +02:00
Mark de Wever
525cd6ea42 Adds a basic version of the SDL2 test tool.
The tool is used to test parts of the new SDL2 code, without the need
to directly modify the main Wesnoth code.
2014-05-10 11:36:53 +02:00