206 Commits

Author SHA1 Message Date
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
Nils Kneuper
9b36ef3207 fix the issue with cmake adding -NDEBUG 2014-02-16 10:45:08 +01:00
Mark de Wever
8a1ff1eca2 Adds -Wold-style-cast to the CMake strict flags. 2014-02-14 21:42:48 +01:00
Mark de Wever
074731d6ac Adds the -Wconditional-uninitialized flag.
The flag is used for pedantic compilation. It also fixes some false
positives in Clang. Since the changes are trival silence the warnings.
2014-02-02 23:03:43 +01:00
Mark de Wever
a2b8589143 Adds -Wextra-semi to pedantic compilation.
Also fixes all warning messages.
2014-01-26 14:24:12 +01:00
Mark de Wever
c8d95a0a92 Disable -Woverloaded-virtual for clang.
Clang 3.4 compiles cleanly with this warning enabled, but Clang 3.2
fails. (Clang 3.3 hasn't been tested.)

This reverts 5fb8dc8a3356b284b8890481df62cfb087a2c300
2014-01-18 22:30:11 +01:00
Alexander van Gessel
5fb8dc8a33 Don't silence a useful warning in cmake 2014-01-05 18:10:44 +01:00
Mark de Wever
5bb7e90a43 Adds -Wno-documentation-deprecated-sync flag.
Clang 3.4 is unhappy that Doxygen comment with @deprecated is not
accompanied with a deprecated attribute. Since we don't do that, disable
the warning.
2014-01-05 15:37:32 +01:00
Nils Kneuper
2b210da5c9 make sure the OpenPandora build does not crash because of libvorbis
Extension of commit 329e7cea968a by fendrin. Now when a build parameter
is defined, the cmake recipe will no longer link in libvorbisfile (just
linking it in makes the app crash when ogg-vorbis music is played).
2014-01-02 19:04:01 +01:00
Mark de Wever
05ad49a955 Adds -Wno-deprecated-register compiler flag.
This flag is used on strict compilation to avoid warnings regarding the
register keyword being used. It is used in several system headers and the
upcomming Clang 3.4 warns about it.
2013-10-06 17:26:37 +02:00
anonymissimus
afc463b83f cmake/MSVC: deactivate -Wall which doesn't make much sense for MSVC 2013-06-24 23:00:28 -04:00
anonymissimus
f0142feee1 cmake/MSVC: add define NOMINMAX
Not setting this can cause compiler errors when using std::max or
std::min, as the windows header defines macros with these names otherwise.
The standalone project file was doing it that is why I didn't get said
errors there.
2013-06-24 23:00:27 -04:00
anonymissimus
37091437b4 cmake/MSVC: vorbisfile is not required since that code is #ifndef win32 2013-06-24 23:00:27 -04:00
Mark de Wever
dfef23aebc Decreases the pango cairo dependency.
The dependency's version is decreased to version 1.21.3. This is the
version currently used in XCode (on the Mac). Upgrading there is
troublesome.

This partly reverts 2b939cebc7a4eea6ec6adae40c8396f836122940.
2013-06-03 21:32:07 +02:00
Mark de Wever
5301eedbe6 Disable null conversion warning in CMake.
It gives problems when using Clang and boost::shared_ptr when compiling
for C++11. The issue can't be fixed since Wesnoth uses C++98. (So we use
NULL instead of nullptr.)
2013-06-01 11:22:10 +02:00
Mark de Wever
1e766c2246 Add Vorbis support to the CMake build system.
Applies patch #3920.
2013-05-29 20:27:49 +02:00
Mark de Wever
b2353cc016 Improve the autorevision in cmake.
It now sets its default based on an initial testrun.
2013-03-30 19:37:44 +01:00
Eric S. Raymond
7f85fa000c The git transition.
Most references to and dependencies on Subversion have been removed.
"+svn" is now "+dev". Files that can't be fixed yet have a FIXME-GIT
comment in them; most of these are in the website tests.
2013-03-26 10:44:47 -04:00
Mark de Wever
4cb7351cd2 Disable the revision numbers by default.
With the option enable the compilation fails with an exported directory.
Need to look for a better fix later.
2013-03-21 21:39:36 +00:00
Mark de Wever
43f617179e Adds autorevision based revision numbers.
This commit adds the support for CMake.
2013-03-15 20:28:52 +00:00
Mark de Wever
53259cf8c8 Increased the pango cairo dependency to 1.24.4.
Loonycyborg I didn't see a version check in SCons and I didn't add one,
please review.
2013-02-16 09:07:31 +00:00
Mark de Wever
51d837cf65 Adds -Wdocumentation to the CMake pedantic flags. 2013-01-23 19:59:27 +00:00
Mark de Wever
d6ec2a42fb Adds -Wnoexcept to the CMake pedantic flags. 2012-11-05 19:19:20 +00:00
Mark de Wever
17e542dac1 Add -Wc++11-compat to the pedantic flags. 2012-10-07 09:17:50 +00:00
Mark de Wever
7a3fa073da Add -Wuseless-cast to the pedantic flags. 2012-10-07 09:17:47 +00:00
Mark de Wever
300b7702c5 Disable the systemd installation for CMake.
It has the following issues:

- Only works if the user has installed systemd development headers.

- Must install the game or unit test to be able to detect systemd.

- Doesn't work if wesnothd has a prefix or suffix in its name.

- The user has no way to opt-out; installing wesnothd doesn't mean it
  has to be started by default.

It is intended to address all those issues, but it should delay the
release of 1.11.0.
2012-08-25 07:06:19 +00:00
Sergey Popov
c62cccd0ab Added support for installing a systemd unit file for wesnothd 2012-08-24 15:55:19 +00:00
Mark de Wever
7e13a53e4e Add -Wmismatched-tags to the pedantic flags. 2012-07-21 21:10:34 +00:00
Mark de Wever
659d19c4f4 Add -Wdouble-promotion to the pedantic flags. 2012-07-21 21:10:32 +00:00
Mark de Wever
5c38ce6151 Add -Wnon-virtual-dtor to the pedantic flags. 2012-07-21 21:10:29 +00:00
Mark de Wever
00af0909c2 Add -Wctor-dtor-privacy to the pedantic flags. 2012-07-21 21:10:26 +00:00
Mark de Wever
20de726f8a Add -Wredundant-decls to the pedantic flags. 2012-07-17 19:50:56 +00:00
Mark de Wever
0bba0e5afb Add -Wmissing-declarations to the pedantic flags. 2012-07-17 18:42:06 +00:00
Mark de Wever
6f0ffcf9df Fix some issues when using MSVC.
There are still issues remaining, but this fixes some of them. The other
issues are still being investigated.
2012-07-15 20:48:32 +00:00