Since there's already a getopt library in thirdparty/, there's no need to
guess about ways to make it work with a system header without support in
the C library itself.
Keep the check for C++0x/C++11 for now. Remove that flag instead of not
adding it, because it most likely still is in the CMAKE_CXX_FLAGS, which
are cached.
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.
Moving the flags from CMAKE_CXX_FLAGS to OC_CXX_FLAGS, adding flags and
removing duplicates keeps CMAKS_CXX_FLAGS from growing. Unfortunately,
-std=gnu++0x needs to be in CMAKE_CXX_FLAGS before compiler features get
tested, but CMAKE_CXX_FLAGS is filled from OC_CXX_FLAGS further down.
Fortunately, all tests for compiler flags are quite simple, so they can be
done at the beginning, and the feature tests after that. Reorder the code
accordingly.
In order to be able to remove duplicates from the list, each flags needs to
be a separate list item. Otherwise, the flags from the previous run in
CMAKE_CXX_FLAGS, which are now separate list items due to
separate_arguments(), will not be recognized as duplicates of the freshly
added flags. Fortunately, in the next round the two sets of flags in
CMAKE_CXX_FLAGS will be reduced to one set, so there were never more than
two copies of the warning flags.
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.
Another piece of code that hasn't been tested in ages, gone. The default
puncher address was still pointing to clonk.de, which I'm very certain
isn't providing UDP hole punching services anymore.
Instead of a bespoke hole punching implementation we should use a STUN
lib.
libmisc is the support library that references thread code and timing.
So the dependencies on pthread and rt should be attached to libmisc
instead of every single binary.
libc4script uses C4Group, so it has a dependency on libmisc. Make this
dependency explicit so all targets that use libc4script also
automatically pull in libmisc.
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.
mape uses several headers from OpenClonk that are marked for
pre-compilation. MSVC does not support using headers flagged as such
without also linking to the object file that gets generated from the
compilation step.
The minimum GTK version is now GTK+ 3.4, which is available since 2012.
It's part of Ubuntu LTS 12.04, and so should be available on any halfway
modern linux distribution.
This should allow getting rid of using deprecated GTK+ API much easier.
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.
For one, people are unlikely to still have these variables in their
cache, and for another, if building fails, the proper solution is to
start from a clean slate anyway.
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.
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.
Instead of doing the transformation when drawing a mesh. This allows making
the OpenGL normal matrix more consistent, since it does not include the
Ogre-To-Clonk transformation, and so that the transformation does not need
to be inverted in the shader.
As a side effect, all Attach transformations were updated, since before
they were specified in the OGRE reference frame, not the Clonk reference
frame.
* 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)
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.