Commit Graph

56 Commits (master)

Author SHA1 Message Date
Nicolas Hake 3b0891ba89 CMake: Remove #define for standard C++ features
We don't need to have a macro that just tells us that we're in fact
using standard C++. Especially if it isn't used anywhere.
2018-12-31 12:37:34 +01:00
Nicolas Hake b012189af4 CMake: Remove <stdint.h>, <inttypes.h> tests
<stdint.h> and <inttypes.h> are part of the C standard and available
on every platform with a conforming compiler.
2018-12-31 12:33:49 +01:00
Nicolas Hake 8298813a90 CMake: Remove <direct.h> test
We're not using the <direct.h> header anywhere besides including it
for no purpose, so we can drop the test (and the inclusion).
2018-12-31 12:20:39 +01:00
Lukas Werling 5395a8dc84 Add WITH_APPDIR_INSTALLATION configuration option
With this option enabled, `make install` will install the files in an
AppDir-compatible directory structure suitable for creating an AppImage.
2018-09-24 19:22:32 +02:00
Lukas Werling 9855f9355e Autodetect "/proc/self/exe"-equivalent on FreeBSD (#1999) 2018-02-17 12:41:16 +01:00
Lukas Werling 19b00b7862 Use backward-cpp on Linux for nicer stack traces 2017-03-21 20:17:55 +01:00
Nicolas Hake 168824a603 Win32: Use _vsprintf_p instead of v(a)s(n)printf (#1892)
This makes it possible to use positional parameters in format strings on
all platforms.
2017-02-19 12:57:27 +01:00
Günther Brammer 544c1cbb4b CMake: Remove unused HAVE_X11_KEYSYM_H 2016-02-13 22:36:41 +01:00
Günther Brammer 609b64f72b Remove unused macro from config.h.cmake
HAVE_PRECOMPILED_HEADERS is only used internally in CMakeLists.txt.
2016-01-23 23:05:16 +01:00
Günther Brammer 93f12150c4 CMake: Remove obsolete USE_X11 option and add USE_WIN32_WINDOWS
USE_WIN32_WINDOWS was previously defined in PlatformAbstraction.h. Move it
to CMakeLists.txt and config.h like its peers. Replace USE_X11 with USE_GTK
or GDK_WINDOWING_X11 as appropriate.
2016-01-23 20:36:34 +01:00
Günther Brammer 11bbeb2a5b Rename WITH_DEVELOPER_MODE to USE_GTK
This mirrors USE_WIN32_WINDOWS, USE_SDL_MAINLOOP and USE_COCOA.
2016-01-23 20:36:33 +01:00
Günther Brammer 6a53066c36 Include config.h only from PlatformAbstraction.h
In order to avoid duplication, PlatformAbstraction.h has to be included at
the start of every source file, so that various headers can rely on it
being there. To avoid confusion, always rely on that, instead of sometimes
randomly including it or parts of it again.
2015-12-28 18:50:31 +01:00
Günther Brammer 30e0cdb418 CMake: Re-enable readline support for openclonk-server 2015-12-28 18:48:45 +01:00
Nicolas Hake d737dc1b05 Remove C4Video, StdVideo
Video recording and playback only worked on Windows, and recording only
handled video, not game audio. As such, it was of fairly limited use,
and there's lots of software available these days that handle both.
2015-12-28 11:43:41 +01:00
Armin Burgmeier 2164976bf6 Fix openal linker errors in mac server build 2015-12-24 16:11:00 -08: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
Nicolas Hake a5f7332c02 Remove unused feature support test macros
We know we have static_assert (and a working <regex>) because we're
erroring out of cmake if we don't, and these macros weren't hooked up to
anything anymore anyway.
2015-10-12 17:34:29 +02:00
Nicolas Hake 9f03209ed7 Stop checking for nullptr
We're already requiring the compiler to implement C++11, so checking for
nullptr support again is useless.
2015-10-12 17:34:28 +02:00
Nicolas Hake a9bf9bfc36 Remove a bunch of vestigial autotools defines from config.h
autotools by default checks for a bunch of stuff absolutely nobody cares
about. The macros removed here were stuff left over from porting the old
autotools build to cmake.
2015-10-12 17:34:28 +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
Nicolas Hake c8e1a38950 Revert "Replace strtod with strtof_l ..."
This reverts commit 139dee9874.

The commit introduced a memory leak on glibc, and broke the build on all
other platforms.
2015-10-01 20:50:40 +02:00
Julius Michaelis 139dee9874 Replace strtod with strtof_l in C4ScriptGuiWindow::SetPositionStringProperties to avoid locale problems
(That function could still use some more love, though: Error messages and not accepting ridiculous things when parsing.)
2015-10-01 19:50:05 +02:00
Nicolas Hake 6a11e3e811 Stop checking for rvalue ref support
We already require support for std::unique_ptr, which itself requires
support for rvalue references. As such, we know we can use rvalue
references, and thus don't have to keep carrying dead code around.
2015-09-20 13:27:14 +02: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 db295b8678 Add emulation of C++14's std::make_unique
Unlike std::make_shared, std::make_unique was unfortunately missing from
C++11. It's a useful utility though.
Technically, declaring a new name in the std namespace is undefined, but
the other way to make make_unique available to all callers regardless of
C++ version, putting it into a distinct utility namespace and importing
the declaration from std if available, makes for more ugly code.
2015-02-25 23:37:04 +01:00
Nicolas Hake 9bfd232ab5 Test whether GLDEBUGPROCARB's userParam is const or not
Depending on how current your headers are, the userParam parameter to
GLDEBUGPROCARB may be const, or it may not. The ARB has added the const
qualifier at some point after publishing the specs. Hooray for breaking
API changes.
2015-02-16 21:21:31 +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
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
Kevin Zheng 7bc06ad652 Fix iconv detection and 'const' qualifier. 2014-06-09 04:11:52 +02:00
Günther Brammer 42602fc79a Finish DEBUGREC compile option removal
Except for the DEBUGREC_RECRUITMENT option available in C4Include.h
2014-05-28 03:38:11 +02:00
Nicolas Hake 3c80a745b0 MinGW: Use __mingw_vasprintf if available
Recent versions of MinGW do no longer declare vasprintf in <stdio.h>,
but they ship a compatible function called __mingw_vasprintf. Use this
function if vasprintf isn't available.
2014-03-25 23:20:34 +01:00
Tim Blume 240193ad5a Remove remains of Direct3D support
Direct3D hasn't worked for more than a year now, and there don't seem to
be any efforts to revive it. Remove it and concentrate on better OpenGL
support.
2013-11-02 21:39:34 +01:00
Nicolas Hake 924e0538fc Fallback to Boost.Regex if <regex> is broken
A large number of g++ versions ship a <regex> that declares all of the
required functions, but don't actually implement them, making using them
result in a linker error.

Fallback to Boost.Regex if the host C++11 <regex> implementation is
broken; the interface is the same anyway, only differing in the
containing namespace.

Unfortunately, Boost.Regex is not a header-only library, but this is not
a big deal because all major Linux distributions ship it, and Visual
Studio implements <regex> since 2010 (the oldest version we still
support).
2013-10-29 16:59:38 +01:00
Nicolas Hake 759cf73704 cmake: Make Freetype mandatory for non-headless builds
OpenClonk fails to start without Freetype support, because it cannot
load required fonts.
2013-10-18 22:27:55 +02:00
Günther Brammer 4dffefe8c9 X11: Remove support for the xf86vidmode extension
In practice, only the xrandr code path received any testing. Since Clonk
works fine without changing the resolution, this will not terribly
inconvenience anybody still stuck on old systems without xrandr.

Also only minimize the window when the resolution was changed.
The minimization is there to prevent accidental focus restoration
resulting in unwanted resolution switching.
2012-11-17 18:07:37 +01:00
Günther Brammer 7bd8c03978 cmake: Sort config.h.cmake by macro name
The config.h file is automatically sorted by autoheader. This keeps them in
sync.
2012-11-17 22:36:50 +01:00
Günther Brammer 06cb8b595d win32: Remove obsolete #include multimon.h
multimon.h was only needed for compatibility with Windows 95.
2012-07-18 03:40:19 +02:00
Nicolas Hake cc672bbd00 win32: Automatically check for DbgHelp availability 2011-10-03 13:09:51 +02:00
Günther Brammer 273acfff80 win32: Make vfw32 optional
The features it was used for are very seldomly used, and some build
environments don't have the import library.
2011-05-12 17:13:38 +02:00
Günther Brammer fe1ea5c5a3 linux: remove inotify support on glibc < 2.4 2011-03-17 02:33:56 +01:00
Günther Brammer cacceef1c6 linux: use eventfd for CStdNotifyProc 2011-03-17 02:26:37 +01:00
Günther Brammer 8036211c30 linux: Use timerfd instead of poll timeouts 2011-03-15 17:27:10 +01:00
Nicolas Hake 62f840412e Check for static_assert support 2010-05-29 14:44:16 +02:00
Julius Michaelis 530a70f43c Create a log file for each instance of clonk on UNIXes (cmake only) 2011-03-02 18:54:28 +01:00
Armin Burgmeier ffe24d471a Add a CMake option for generating mini dumps 2011-01-02 01:20:52 +01:00
Martin Plicht a22d5ee35c Mac: Add Cocoa port 2010-12-27 04:49:02 +01:00
Armin Burgmeier 1967d914c2 Add a compile-time option to disable automatic update 2010-12-26 21:39:52 +01:00
Nicolas Hake bfd803bd54 cmake: Remove useless NULL_IS_NULLPTR_T check 2010-09-29 23:14:08 +02:00
Armin Burgmeier bd2f63bf1d Add an option to build against GTK+ 3 2010-09-22 17:11:19 +02:00
Nicolas Hake b1f0c3e1c6 Remove a49cc8f3de41 and add more solid fix 2010-01-24 02:48:55 +01:00