Commit Graph

585 Commits (master)

Author SHA1 Message Date
Linus Heckemann c7550bd43c openclonk-server: install 2019-01-20 12:49:39 +01:00
Nicolas Hake 15ad4fb690 MSVC: Disable incremental linking
LTCG doesn't work with incremental linking, but unless we explicitly
disable incremental linking, CMake tells the linker to attempt it.
2019-01-01 21:26:30 +01:00
Nicolas Hake 1b2f2889ad Old CMake: Correctly handle try_compile with language standard flags
CMake before 3.7 didn't properly pass the standard selection flags
to try_compile. Wrap try_compile on old CMake versions so that the
flag gets passed.
2018-12-31 17:34:34 +01:00
Nicolas Hake 7cd79b1eaa CMake: Use native Qt5 config instead of bad reimplementation
Qt5 already ships CMake configuration files with proper dependencies
so there's no need to build our own broken test for it.
2018-12-31 12:48:19 +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 c638647227 CMake: Remove <locale.h> test
We're not using the <locale.h> header anywhere besides including it
for no purpose, so we can drop the test (and the inclusion).
Additionally, the header is part of standard C++.
2018-12-31 12:30:06 +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
Nicolas Hake 15f4a06cd4 CMake: Require C++14 support
CMake now supports compiler features (including language level), so
we can directly require C++14 instead of testing for compiler-
specific flags.
2018-12-31 12:15:49 +01:00
Nicolas Hake b702f1583c CMake: Update requirements to 3.5.1
CMake 3.5.1 is the version that ships with Ubuntu 16.04 LTS. Ubuntu
14.04 LTS was already unsupported by our build, so we don't need to
worry about that.
2018-12-31 11:51:21 +01:00
Nicolas Hake 606ad23e02 CMake: Deprecate CMAKE_ADDITIONAL_DEPS_PATH
The variable completely duplicates a different one and also intrudes
on CMake's own namespace. It should therefore be removed when
possible.
2018-12-31 11:34:18 +01:00
Julius Michaelis 0d7738dce5 Drop broken GCC precompiled header support 2018-10-04 08:33:31 +02:00
Lukas Werling 8df71d3f32 Prevent parallel groups packing with ninja
For some reason, generating the groups in parallel fails frequently.
2018-09-24 19:22:32 +02: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 d8add861fe Fix LTO ar wrappers for versioned gcc executables
Debian packages older/newer gcc versions with executables named like
gcc-5, gcc-ar-5. The previous implementation did not handle this
correctly, breaking LTO-enabled linking.
2018-09-24 17:43:27 +02:00
Romain Naour 4ae0a92d39 CMake: add C4GROUP_TOOL_ONLY
When cross-compiling c4group should be build for the host
machine before building OpenClonk for the target.

Without C4GROUP_TOOL_ONLY option, we have to build OpenClonk
for the host.

C4GROUP_TOOL_ONLY allow to build only c4group tool for the
host.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
With this patch I can build OpenClonk with Buildroot.
2018-04-21 10:58:31 +02:00
Romain Naour 87b60e99f6 CMake: use FIND_PROGRAM
While cross-compiling, it is easier to find a binary
from the patch using FIND_PROGRAM instead of using
a cmake file.

Try to find c4group native tool with FIND_PROGRAM and
fallback to the cmake file if c4group is not found.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2018-04-21 10:18:50 +02:00
Romain Naour 48c38c91dc CMake: build libmisc and libc4script statically
As reported by [1], some distributions use shared libraries as
default preset in CMake.

Without explicitely linking statically libmisc and libc4script,
we have the following link issue:

[...]/host/bin/x86_64-linux-g++ --sysroot=[...]sysroot
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-std=gnu++14 -Wall -Wextra -Wredundant-decls -Wendif-labels
-Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self
-Wsign-promo -Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor
-Woverloaded-virtual  -DNDEBUG
-rdynamic CMakeFiles/c4group.dir/src/c4group/C4GroupMain.cpp.o
-o c4group
-Wl,-rpath,[...]/build/openclonk-7.0:
liblibmisc.so -lz -lpthread -lrt
liblibmisc.so : référence indéfinie vers « C4LangStringTable::Translate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const »
liblibmisc.so : référence indéfinie vers « C4LangStringTable::system_string_table »

[1] https://github.com/openclonk/openclonk/pull/26

While at it, build libopenclonk statically since libopenclonk is not
installed by the CMake build system.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2018-04-21 10:18:50 +02:00
Lukas Werling 9a5103d02c Don't link openclonk-server with SDL and audio libraries
Seems to build fine without, which apparently wasn't always the case.
2018-03-09 23:10:11 +01:00
Nicolas Hake e3de9f1003 Add BLAKE2 library and expose its a CS hash algorithm to script
The crypto "library" only consists of a single function at the
moment because that's all that users have asked for so far. It is
also highly experimental. We will make an attempt to keep the public
interface (i.e. the interface provided by Library_Crypto.c) stable,
but it might still change if necessary. The internal interface
(provided via the global _Crypto proplist) is not for public
consumption and will probably change at some point.
2018-02-25 10:23:30 +01: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
Lukas Werling 9855f9355e Autodetect "/proc/self/exe"-equivalent on FreeBSD (#1999) 2018-02-17 12:41:16 +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 8a050c1ff9 Disable Qt library deployment for mac.
Doesn't seem to work on the autobuild server.
2018-02-12 21:51:50 -08:00
Sven Eberhardt 9df7a193e4 Deploy Qt libraries; fix platforms NSIS installer include 2018-02-12 21:44:18 -08:00
Lukas Werling 08edf3bb58 Enable -Wformat-security for gcc and fix one warning (GH-64)
Fedora has -Werror=format-security enabled per default, so enabling and
fixing these warnings is a good idea.
2018-02-06 23:31:50 +01:00
Julius Michaelis e324289f8d Do not pack music on installation (#1671) 2017-12-12 10:18:15 +01:00
Julius Michaelis 3eb6dcbcd3 CMakeLists.txt: stop using add_backward and qt5_use_modules
(the former adds libraries multiple times, the latter is deprecated)
2017-09-23 16:52:33 +02:00
Lukas Werling e59205c2f3 Don't update MIME cache on install (#1618)
The install target is used both for manual installation and for
packaging. Updating the packager's MIME cache isn't very useful. Show a
message instead which reminds both packagers and regular users to run
the command.
2017-08-12 16:56:14 +02:00
Sven Eberhardt 1b4fd9abe3 Editor: Add translation overview table (Tools menu) 2017-05-09 22:43:56 -04:00
Sven Eberhardt 3289068ee0 Move C4PropertyPath class into its own files 2017-05-09 22:43:06 -04:00
Sven Eberhardt 94669cebe4 Merge branch 'master' of ssh://git.openclonk.org/openclonk
Conflicts:
	src/editor/C4ConsoleQtPropListViewer.cpp
2017-05-07 15:16:01 -04:00
Sven Eberhardt 4fac960cf4 Editor: Add localized string support 2017-05-07 14:26:30 -04:00
Lukas Werling 5719524241 Move C4AchievementGraphics to its own file
Scenario parameters are useful in a script-only context (such as the one
mape uses). C4AchievementGraphics introduces a dependency on C4Surface
which isn't available in that context.
2017-04-03 11:55:22 +02:00
Julius Michaelis b0a45e01ac Install c4groups even with HEADLESS_ONLY 2017-04-01 12:14:11 +02:00
Lukas Werling 19b00b7862 Use backward-cpp on Linux for nicer stack traces 2017-03-21 20:17:55 +01:00
Nicolas Hake eee5a5d663 Win32: Link libmisc against Winsock
Some parts of libmisc call into Winsock, so we should link that instead
of just linking it into the final binaries.
2017-03-05 12:41:52 +01: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
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
Nicolas Hake 30c5bb5f8d Aul: Allow the user to selectively enable/disable warnings
This commit introduces a new Aul directive "#warning", which can be used
to enable or disable warnings for a particular piece of code.

"#warning enable" enables all warnings.
"#warning disable" disables all warnings.
"#warning enable empty_parameter_in_call" selectively enables one
specific warning while not affecting any other.

All warnings that used to be controlled by Developer.ExtraWarnings
remain disabled by default.
2017-02-13 15:07:50 +01:00
Lukas Werling ef4f1d9231 Merge branch 'ipv6' 2017-01-18 21:59:16 +01:00
Nicolas Hake 102047f537 Implement IPv6 support to C4NetIO 2017-01-09 20:34:43 +01:00
Nicolas Hake 561e083181 Win32: Fix build with MSVC's Clang-based toolset
Well, somewhat. I can't get Clang/C2 to build Qt so I can't build OC
with Qt support.
2017-01-07 13:41:47 +01:00
Nicolas Hake b0b0533227 Make c4script binary use our private getopt library if necessary
Systems that don't come with getopt/getopt_long in their runtime library
need to link to our private copy; link that and use the right const-ness
for its prototype.
2017-01-07 13:41:45 +01:00
Julius Michaelis 64dd72c380 Fix dedicated: Load JPEG surfaces so the texture shape information can be correctly generated 2016-10-30 21:36:29 +01:00
Julius Michaelis e61dcbe4c3 Extend the netpuncher: clients can ask hosts for a connection initiation to circumvent port restricted NATs 2016-10-23 22:34:43 +02:00
Julius Michaelis 078ac47780 Add CMake option for headless-only build. 2016-10-23 22:34:42 +02:00
Julius Michaelis 072c4a3475 Fix windows build: link libpng to libopenclonk
Attempt #2
2016-10-22 21:33:10 +02:00
Julius Michaelis b658f6aeed Fix windows build
Attempt #1
Make that 26 compilation units saved.
2016-10-22 19:59:23 +02:00
Julius Michaelis f72bfc72a3 Add a libopenclonk target to save compiling some units twice
Unfortunately, only 27 units could be deduplicated with the current state of USE_CONSOLE.
2016-10-22 18:28:25 +02:00
Julius Michaelis 376ca5a9df Prevent using USE_CONSOLE in lib{misc,c4script} 2016-10-22 17:42:23 +02:00