Commit Graph

70 Commits (master)

Author SHA1 Message Date
Julius Michaelis 0d7738dce5 Drop broken GCC precompiled header support 2018-10-04 08:33:31 +02:00
Lukas Werling 55c34ecbd7 Add git branch to C4Version.h
The branch information is necessary for upcoming automatically-updating
snapshots. For Travis, cmake will also pick up the branch name from the
C4REVISION_BRANCH environment variable.
2018-10-03 23:44:35 +02:00
Nicolas Hake 8e57c0a9f4 Make cross-compiling work with GCC 6+
GCC6 doesn't like getting some of its default include search paths
passed with the -isystem flag, and the devs seem unlikely to change
whatever they did back to before they broke it. Work around CMake
not dealing with it well either by figuring out the paths at
configure time and telling CMake about them so it can avoid adding
them superfluously.
2018-02-25 01:11:53 +01:00
Sven Eberhardt 9c32ee0336 Make QT library deployment optional via CMake option DEPLOY_QT_LIBRARIES (default off) 2018-02-15 21:40:25 -08:00
Sven Eberhardt b95dd50564 Simplify DeployQt to work with CMake<3.2 (hopefully). 2018-02-14 21:33:06 -08:00
Sven Eberhardt 9df7a193e4 Deploy Qt libraries; fix platforms NSIS installer include 2018-02-12 21:44:18 -08:00
Tushar Maheshwari 8fef67378d get year from CMake directly 2017-06-12 08:36:43 +02:00
Nicolas Hake bc5df7f35b CMake: Add date of commit to logfile
But only if the build is from a clean index. Otherwise, the logfile will
contain the date of build.
2017-04-12 12:34:36 +02:00
Nicolas Hake 94608179f3 CMake: Regenerate build when Git index changes 2017-04-12 11:56:18 +02:00
Nicolas Hake 9bb3dd8877 Win32: Don't try to locate Windows SDK
MSVC already knows where the Windows SDK is located, so we don't have to
replicate that logic in CMake (then get it wrong and link to an outdated
one).
2017-03-05 12:14:32 +01:00
Julius Michaelis 5f1ad6a5d7 Travis: fancy stuff
- gtest
 - colors
 - container based builds and GCC PCH (for a faster: "you failed")
2017-02-21 17:13:18 +01:00
Armin Burgmeier f68fa47266 Fix auto-detection of SDL2_Mixer audio provider 2016-12-29 23:12:45 -08:00
Nicolas Hake 721753b396 OS X: Query pkg-config for freetype location
Nobody remembers why we're not using pkg-config on OS X, so we'll go back
to it and see what breaks.
2016-06-24 19:20:33 +02:00
Nicolas Hake b7f1bb749b freetype: Let system module handle REQUIRED attribute
If pkg-config can't find the freetype libraries, maybe the cmake system
module can. And if it can't, then it'll still fail if REQUIRED is set.
2016-06-24 19:20:33 +02:00
Lukas Werling 07e8c75bac Replace libupnp with miniupnpc
- The new code works with my router while libupnp didn't. :)

 - There are some unexplainable crashes in libupnp: #1640

 - Using miniupnpc seems to be less complex than libupnp.

 - Apparently, miniupnpc also works on Windows, so we may be able to use
   it for all platforms.

Disadvantage: UPnP queries aren't asynchronous anymore, but they seem to
be pretty fast (< 1 s).
2016-05-29 23:38:12 +02:00
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Lukas Werling 19caa65b7b Merge branch 'sdl-gamecontroller' (pull request GH-17) 2016-03-21 16:39:28 +01:00
ckanibal 8f31ae22bf Make Windows build great again! 2016-03-07 00:58:23 +01:00
Nicolas Hake ec0055f260 Link to terminfo or one of its compat libraries in add'n to readline
Unmodified readline relies on, but doesn't link to, a termcap library.
Several Linux distributions patch this, but others don't; to avoid build
failures, we'll just link to a library that provides termcap symbols
even though we don't use them ourselves. Fixes Github #15.
2016-02-13 22:15:35 +01:00
Günther Brammer 32d8d0db76 Finish the update from SDL_Mixer to SDL2_Mixer 2016-02-06 17:28:15 +01:00
Günther Brammer 934b519bb4 Update the SDL port to SDL2
SDL2 is a much closer match to the other platform code, and
allows the creation of OpenGL 3 core contexts, which is
now required.
2016-02-06 16:48:21 +01:00
Günther Brammer 263b3bf909 CMake: Remove USE_CONSOLE remnant
The code was from the time where the dedicated server was an alternative
toolkit, not a separate build target.
2016-02-06 15:54:47 +01:00
Günther Brammer 16ef28e05f Drop unused C4VERSIONBUILDNAME and C4ENGINEINFO
This was used to name snapshot releases of the Network2 branch, and has
seen almost no use since.

C4ENGINEINFO(LONG) was a duplicate of C4ENGINENAME and C4ENGINECAPTION.
2015-12-29 15:47:55 +01:00
Günther Brammer 30e0cdb418 CMake: Re-enable readline support for openclonk-server 2015-12-28 18:48:45 +01:00
Nicolas Hake da51a2d8af CMake: Have headless build as a project instead of a separate config
Hardly anyone ever tests the headless build, because it requires you to
run CMake a second time with -DUSE_CONSOLE=On. So now it's an included
project which you'll get whether you want it or not.

I'm well aware that this could be solved more nicely, and that we could
be splitting unchanged files out into a separate support library, but
that's left for a later date.
2015-12-16 00:50:09 +01:00
Julius Michaelis 5b9f4bf4d0 Fix cmake/FindGTK3.cmake (fix by Isilkor) 2015-10-21 21:56:02 +02:00
Nicolas Hake 5abc112a81 CMake: Split GTK3 tests into a separate module
Nobody uses pkg-config on Windows, and we already have a perfectly
viable solution for finding libraries - it's called CMake. We're still
defering to pkg-config when it exists because who knows what arcane
cflags might be required on some systems.
2015-10-19 16:11:12 +02:00
Nicolas Hake 0c1abe69f9 Get rid of FMOD
Not only is FMOD neither free (libre) nor free (gratis), the version we
support(ed) is also impossible to legally obtain anymore. So there's no
reason we should keep code around that (pretends to) support a library
nobody can use or test.
2015-10-12 17:34:26 +02:00
Julius Michaelis 6fe58fd878 Add warning about old gcc when !HAVE_WORKING_REGEX
Related to ee859d8.
2015-10-03 13:42:46 +02:00
Nicolas Hake 8e36b43f9c CMake: Split GLEW out into a module, look for both shared and static lib
On Windows, we need to know whether the library we're linking against is
a static library or a shared library import stub. If it's a shared lib
(and only then), we need to #define GLEW_STATIC.

Other OSes handle library imports differently and don't care.
2015-09-19 21:35:55 +02:00
Sven Eberhardt 535fc79c0f Silence a few compiler warnings. 2015-08-29 08:33:00 -04:00
Sven Eberhardt bc2259d197 MSVC/Apple CMake: Search for alext.h separately and make OpenAL extensions optional if only al.h is found. 2015-08-28 20:11:59 -04:00
Nicolas Hake 97d7240fe8 Fix C4ENGINECAPTION generation
Not only was it interpolating the wrong variable, it was also adding a
space that shouldn't be there.
2015-05-22 21:00:17 +02:00
Nicolas Hake 2eb78b617d Split calculated values out of Version.txt
Version.txt should only contain values that you set manually. Anything
that's derived from that or calculated separately should be in a
separate file.
2015-05-21 23:09:01 +02:00
hasufell 5f29846b7d Fix USE_SYSTEM_TINYXML
* fix the if-conditional
* don't use pkgconfig (there is no .pc file upstream)

Signed-off-by: Julius Michaelis <caesar@hg.openclonk.org>
(Added license to FindTinyXML.cmake)
2015-03-28 22:58:53 +09:00
Nicolas Hake 0076fc7d7b Fix DbgHelp check
CMake didn't always find the correct DbgHelp.lib on Win64. Somehow,
nobody seems to have noticed!
2015-02-08 15:03:08 +01:00
Günther Brammer a92c22a7b3 Merge various build system fixes and cleanups 2015-01-25 18:50:29 +01:00
Nicolas Hake 53ff6da5ef Remove some OSX-specific hacks from the main CMakeLists 2015-01-23 17:15:56 +01:00
Nicolas Hake bc7fcf5daa OpenAL <1.15: check some additional include directories
OpenAL's pkg-config database doesn't list include/AL as a location for
AL headers, but including <AL/al.h> is unusable because some systems
store the headers in OpenAL instead of AL. So check if the file can
actually be found as <al.h> and amend the include directory list
otherwise.
2015-01-19 13:39:18 +01:00
Nicolas Hake 9759f72b89 Downgrade requirements to Ubuntu Precise (12.04LTS) 2015-01-19 12:26:42 +01:00
Nicolas Hake ee62586013 CMake: Fallback to the system FindFreetype if pkg-config fails
Instead of shipping our own copy of FindFreetype.cmake, use the system
one if pkg-config is not available or can't find FreeType.
2015-01-18 20:50:32 +01:00
Nicolas Hake 2b2d70d02a CMake: Update for 3.1 compatibility
CMake 3.1's if() by default now interprets quoted variable names as
strings. This is a good idea from a strictness perspective, so make it
do this even if we're in 2.8.9 compatibility mode.
2015-01-18 20:50:31 +01:00
Nicolas Hake 804bf41c92 Fix UPnP auto-detection
Auto-detecting UPnP might fail when CMake was invoked multiple times.
This would result in a broken build because the compiler would not find
<natupnp.h>.
2015-01-07 21:15:53 +01:00
Günther Brammer d9e3d9db3d Require filenames to be in unicode, remove iconv usage
Every modern operating system and Clonk uses UTF-8, and windows uses UTF-16
and has its own conversion code.
2015-01-03 20:41:03 +01:00
Sven Eberhardt bab89a6514 CMake: Rename OpenAL_LIBRARY to OpenAL_LIBRARIES for MSVC to be more consistent with the other platforms. 2014-09-29 23:07:05 +02:00
Martin Plicht 9891ff048b cmake/FindAudio: Do not add OpenAL_Library to Audio_LIBRARIES on mac because as a preinstalled framework it is just assumed to be present, and linked via the framework linker flag in the main CMakeLists.txt file 2014-09-29 22:29:29 +02:00
Sven Eberhardt 42d53c5225 Add OpenAL_LIBRARY to Audio_LIBRARIES.
Doesn't make sense to not add them. Let's hope this doesn't break autobuilds again.
2014-09-25 16:46:21 +02:00
Martin Plicht cf474e99aa mac: Rearrange sound toolkit includes and FindAudio.cmake so that sound+music works for OSX 2014-09-21 22:16:54 +02:00
Sven Eberhardt d7c59d272b CMake: Add OpenAL to link libraries.
I need this for my build. Let's hope it doesn't break the snapshots.
2014-08-14 17:18:29 +02:00
Nicolas Hake 642ce2eb9c Merge all of the audio provider switches into one
There's no point in splitting the audio library selection into multiple
CPP macros, since there can always only be one anyway. Merge all of them
into a single macro AUDIO_TK (for "toolkit") and have CMake select one
for the user, instead of making him choose (and potentially failing).
2014-08-01 23:37:42 +02:00