Commit graph

98 commits

Author SHA1 Message Date
P. J. McDermott
bfaabe0831 Modify FindLua.cmake to find Lua compiled as C++ 2024-02-11 23:21:15 -06:00
P. J. McDermott
473a4d19bd Add FindLua.cmake and include()d modules
https://gitlab.kitware.com/cmake/cmake/-/raw/3e2094fb/Modules/FindLua.cmake
https://gitlab.kitware.com/cmake/cmake/-/raw/07f0a788/Modules/FindPackageHandleStandardArgs.cmake
https://gitlab.kitware.com/cmake/cmake/-/raw/4ecfd1a7/Modules/FindPackageMessage.cmake
2024-02-11 23:21:15 -06:00
Ivo Julca
4d2cb1ce7f Build: Update scripts for .pot, .po files to support Python files
- Rewrites some of the commands to use Python.
- Also implements wmlxgettext --force-po, similar to xgettext.
2023-06-14 09:58:56 +02:00
Steve Cotton
5b53be5d2a CMake part of replacing po4a-gettextize with po4a-updatepo
The design of po4a seems to expect it to act as a build system,
running with a config file telling it which files to build. In
version 0.68-1, the po4a-gettextize tool has changed to error out
with a comment that it's not being run the way it expects.

See https://bugs.debian.org/1020821

po4a-updatepo works for now with 0.68-1, although it prints a deprecation
message.
2023-05-29 00:21:51 +02:00
Steve Cotton
af7b517f05 CMake 2.24.0: Workaround for missing SDL2::SDL2main 2022-08-27 08:27:38 +02:00
Nils Kneuper
d491415bbf added a cmake hack for finding asciidoc when using recent archlinux 2022-07-09 12:05:48 +02:00
Andrei BENCSIK
1838041a37 Add FindSDL2 to simplify main CML
* the FindSDL2 module forwards to CONFIG mode first
* if that fails (eg. no -version.cmake or config not even present) it
uses pkg-config
* exports SDL2::SDL2 and SDL2::SDL2main as targets
* fix missing IMPORTED_LOCATION for other build types in Vorbisfile
2022-05-11 09:18:14 -05:00
Andrei BENCSIK
ea83e36bdb Refactor FindVorbisFile win32 cleanup 2022-05-02 16:23:17 -05:00
Andrei BENCSIK
066210254a Refactor FindVorbisFile.cmake 2022-05-02 16:23:17 -05:00
Andrei BENCSIK
43c79e34a2 Refactor FindTranslationTools.cmake
* macro for avoiding code repetition
2022-05-01 22:31:23 -05:00
Andrei BENCSIK
5796ae5fca Refactor FindHistory.cmake
* use all lower case keywords for consistency
* add target for libhistory: History::History
2022-04-29 18:44:38 -05:00
Pentarctagon
33f6e7a11c
Remove unneeded cmake file. 2021-12-28 15:00:21 -06:00
Pentarctagon
d516420c1f Alternate way to find SDL2. 2021-12-19 17:51:47 -06:00
Pentarctagon
4574899436 Remove a couple no longer needed cmake files. 2021-12-19 17:51:47 -06:00
Steve Cotton
89828f1f71 CMake: run xgettext on the .cpp file with GETTEXT_DOMAIN "wesnoth"
Make the search for translatable strings include
install_dependencies.cpp in the POTFILES.in file.

Simplify the quoting and escaping, and only open
the POTFILE.in files for writing once each.
2021-11-24 13:10:56 +01:00
Iris Morelle
018a0ebd78
i18n: Add N_n() no-op macro to allow xgettext to extract plural forms
This is intended to allow xgettext to extract plural forms from the code
without actually altering the input. Basically, this is to _n() as N_()
is to _(), and doesn't actually call any gettext functions.
2021-09-17 07:17:34 -03:00
Pentarctagon
b5ab344bc3
Remove in-repo FindCrypto.cmake.
As of cmake 3.4, cmake has built-in support and the minimum is now 3.5.
2021-05-13 14:19:54 -05:00
Pentarctagon
34a493e6df
Remove unused cmake files. 2021-05-07 11:38:47 -05:00
Heiko Becker
a737065505 Remove obsolete FindSDL2_ttf cmake module
It's unused since 2dfdc0061d.
2021-03-22 19:13:03 -05:00
Pentarctagon
6db64459d2 Remove checks for stuff that aren't used anymore. 2021-03-14 22:42:59 -05:00
laikh
c5a1ac03e8 Fix MINGW (with MSYS2) build in Windows 2020-01-31 09:44:09 -06:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0
(cherry-picked from commit bc4d22dc72)
2018-10-07 03:23:36 +00:00
Pentarctagon
dca2c5775d Fix FindGLEW being incorrectly named.
It was .make, it should be .cmake.

(cherry-picked from commit 34965741bd)
2018-10-07 03:20:50 +00:00
pentarctagon
a040d521a4 Updates cmake and scons to be able to compile with OGL.
Scons OpenGL/GLEW test taken mostly verbatim from 3e2eba22a9

(cherry-picked from commit 5e36a90039)
2018-10-07 03:20:04 +00:00
Steve Cotton
107da0f0c8 Make CMake error-out if required libraries aren't found
It seems that FIND_PACKAGE_HANDLE_STANDARD_ARGS is doing a case-sensitive
search for whether the find_package flags included REQUIRED.

(cherry-picked from commit f259976659)
2018-10-07 03:19:56 +00:00
Victor Sergienko
c2a56b403e Hide minor translations (<80%) from language selection menu. (#2552)
@CelticMinstrel suggests we only use non-campaign textdomains without manpages.
2018-03-13 22:51:36 -04:00
Charles Dang
3a90f86674 Addressed more whitespace issues from #2613
[ci skip]
2018-03-12 03:48:59 +11:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
Celtic Minstrel
c9191c9812 Add OpenSSL's libcrypto as a dependency
This also removes the included SHA1 and MD5 implementations
in favour of those from OpenSSL.

Thanks to @jyrkive for helping to get the CMake build working and
ensuring the game still compiles with OpenSSL 1.1.0.
(The SHA_xxx() aliases were removed in OpenSSL 1.1.0.)
2017-05-12 15:57:13 -04:00
Charles Dang
bba5454443 Made README files Markdown
[ci skip]
2017-04-28 15:07:06 +11:00
Celtic Minstrel
b7aea011f9 Add VNGETTEXT macro to complement the VGETTEXT macro 2017-04-15 23:36:57 -04:00
Celtic Minstrel
6bf76d940b Include header files in pot-updates
It would probably be better to avoid using translatable strings in headers,
but certain people keep doing so anyway, so this is more future-proof.
2017-03-16 17:21:55 -04:00
Celtic Minstrel
dc24fa16f7 Remove option to link libintl instead of Boost.Locale 2016-11-18 12:09:56 -05:00
Ignacio R. Morelle
8b341411d6 cmake: Remove SDL_net-related checks and substitutions 2016-10-03 06:59:48 -03:00
Andreas Löf
c42ba83b82 Fix cmake scripts for use on OSX with homebrew.
It seems that cmake won't pick up on the FindPackageHandleStandardArgs
macro on its on from homebrew so I've updated the script to include it.
2015-08-24 19:05:28 +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
Ignacio R. Morelle
81f2cdaf41 cmake: Mark history options as advanced
These are internal options only, not the ENABLE_HISTORY toggle.
2015-04-13 05:01:01 -03:00
Ignacio R. Morelle
303e88ae3a cmake: Mark vorbisfile options as advanced 2015-04-13 05:00:10 -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
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
df09cda92e format cleanup for FriBiDi finding in cmake
finding does not work for me, but at least the file looks more uniform
now...
2015-04-12 13:56:08 +02:00
Nils Kneuper
05d6e7dd9b remove option to use ancient FriBiDi 2015-04-12 13:23:54 +02:00
Ignacio R. Morelle
bf8185390f cmake: Fix regression in FindFriBiDi, take 2
Applying commit fb01510726 doesn't fix
this for Ivanovic, so I'm reverting both that and the original commit
651344ee1b.
2015-04-10 18:27:06 -03:00
Ignacio R. Morelle
fb01510726 cmake: Fix regression in FindFriBiDi
Fixes CMake being unable to find FriBiDi here on Debian jessie.

Commit 651344ee1b introduced something
that looks more like post-processing syntax used by MacPorts and doesn't
appear in CMake's documentation. Reverting this commit fixes FriBiDi
detection for me, but the original approach of hardcoding search paths
seems unnecessary as far back as CMake 2.6.0, our minimum supported
version. This is because find_library() and find_path() both use CMake's
configured system prefixes automatically and provide a PATH_SUFFIXES
option with suffixes to use for e.g. locating FriBiDi's include dir
(/usr/include/fribidi here).
2015-04-10 02:53:29 -03:00
Ignacio R. Morelle
b270658f50 cmake: Quick-and-dirty fix for the DocBook XSL path on Debian
Without this, rebuilding the game manuals fails because
/usr/share/asciidoc/docbook-xsl/xhtml.xsl doesn't exist. We need to use
/etc/asciidoc/docbook-xsl/xhtml.xsl instead here.
2015-01-16 00:25:39 -03:00
Ignacio R. Morelle
47498d9d3e cmake: Fix pot-update target breakage when bash isn't the default shell
(Default shell as in the /bin/sh executable.)

On Debian and other systems using a different Bourne-compatible shell
that doesn't support some of Bash's syntax extensions (in particular,
'&>' as a redirection operator targeting stdout+stderr), the pot-update
target is completely broken, stuffing the POTFILES.in lists for either
the last (wesnoth-utbs) or first (wesnoth-ai) textdomains with paths for
every C/C++ source file from our tree.

Shells that do not interpret &> the way Bash does consider it to be the
stdout redirection operator following an asynchronous invocation. Of
course such a thing is bound to cause weird issues like this.
2014-12-27 05:46:28 -03:00
Chris Beck
651344ee1b commit a patch to our fribidi cmake, from downstream (macports)
see here:
https://trac.macports.org/browser/trunk/dports/games/wesnoth/files/patch-cmake-FindFriBiDi.cmake.diff

i tested that cmake still works and finds fribidi for me (linux)
2014-10-28 12:52:03 -04:00
Mark de Wever
1e766c2246 Add Vorbis support to the CMake build system.
Applies patch #3920.
2013-05-29 20:27:49 +02: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
ef6eb243e1 Recognize newer versions of FriBidi again.
Newer versions don't define a symbol directly confusing cmake, fixed by
letting the compiler test whether it really doesn't exist. The issue was
spotted by Espreon.
2011-03-06 10:09:51 +00:00