Commit Graph

73 Commits

Author SHA1 Message Date
Aaron van Geffen 24fde98837 Define Git variables for CMake. 2016-07-31 17:32:33 +02:00
Michał Janiszewski 550ac03ab7 Enforce proper declarations for every function
Enables -Wmissing-declarations for CMake projects
2016-07-14 14:11:50 +02:00
Michał Janiszewski f82b4b4425 Add -Wundef to CMake-based builds
Verifies all the defines are checked properly
2016-07-09 10:06:09 +02:00
Michał Janiszewski 9240280005 Only disable optimisations when using RCT2 segments (#4007) 2016-07-09 09:57:29 +02:00
Michał Janiszewski cdab4bc0fd Add CMake target not using RCT2, use it for linux64 job 2016-06-16 11:37:52 +02:00
Michał Janiszewski 0ac5c3698b Fix CMake projects, restore testing with OpenGL disabled 2016-06-12 18:49:26 +02:00
Michał Janiszewski 39472ce3f3 Update CMake targets with OpenGL linking (#17) 2016-06-08 13:28:33 +01:00
Michał Janiszewski f8fa637b68 Require OpenSSL in all but network-less builds (#3829) 2016-06-05 21:57:28 +01:00
Michał Janiszewski a79e793e67 Disable whole-project alignment for MSVC & MinGW (#3807)
As OpenRCT2/OpenRCT2#3783 has now been merged, this should be
unnecessary.
2016-06-03 19:07:52 +01:00
LRFLEW 859d861f14 Fix CMake OS X Build (#12) 2016-06-01 22:35:58 +02:00
Michał Janiszewski 778de4e285 Explicitly require OpenSSL>=1.0.0
This is to make sure CMake won't try using OS X's stale version of SSL
2016-06-01 22:23:20 +02:00
Michał Janiszewski 1c459c8186 Add NetworkKey class 2016-05-27 20:28:33 +02:00
Michał Janiszewski 0ddf5ea4c5 Turn on -Werror for all warnings (#3716)
Exclude int-to-pointer-cast and pointer-to-int-cast for 64 bit builds
for now.
2016-05-23 21:28:59 +01:00
janisozaur e28d6634fd Allow builds without -fno-omit-frame-pointer (#3554)
Disables optimizations done to addresses.c, so frame pointer doesn't
have to be kept, allowing for more aggressive optimizations to be done.
2016-05-09 20:24:37 +01:00
Michał Janiszewski b30bab65d8 Add experimental build job for x86-64
This is **build job only**. It does not work yet.
2016-04-26 22:35:47 +02:00
janisozaur e7eae9aff2 Fix clang optimized builds (#3336)
This apparently applies to non-Apple clang only.

When passed any optimization level other than 0, clang took liberty and
re-organised arguments passed to `RCT2_CALL*`, even in presence of
attributes put in place to prevent that: optnone,noinline.

This change allows easier project setup. It was previously possible to
produce a clang optimized build by manually recompiling and relinking
addresses.c.o.
2016-04-18 14:31:38 +01:00
Michał Janiszewski da80a691bc Start 0.0.5
changelog.txt not updated yet
2016-04-13 14:20:40 +02:00
Michał Janiszewski e28de49a34 Breakpad integration
Provide your own breakpad and point cmake at it.

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
mkdir breakpad && cd breakpad
../depot_tools/fetch breakpad # edit the script to use python2
cd src
LDFLAGS="-m32" CXXFLAGS="-m32" CFLAGS="-m32" CPPFLAGS="-m32" ./configure
LDFLAGS="-m32" CXXFLAGS="-m32" CFLAGS="-m32" CPPFLAGS="-m32" make -j 8

Run cmake on openrct2:
cd openrct2
vim CMakeLists.txt # provide your path to breakpad
mkdir build && cd build
cmake ../ -DWITH_BREAKPAD=ON
make -j 8
./openrct2 # open a game, select "about openrct2", crash
2016-04-09 18:57:14 +02:00
Michał Janiszewski 5fe2623613 Prefer libpng1.6 over libpng1.2 if available 2016-04-02 00:52:53 +02:00
Michał Janiszewski f372666d30 Lower libpng requirement to 1.2 2016-04-02 00:52:53 +02:00
Ted John d2cc88099e Merge pull request #3188 from janisozaur/headers-cmake
Add headers to CmakeLists.txt
2016-03-27 22:44:37 +01:00
Michał Janiszewski 2b790e1b5a Add guard to prevent from building in-source 2016-03-27 23:29:45 +02:00
Michał Janiszewski 8de2310d63 Add headers to CmakeLists.txt
This doesn't really affect compilation in any way, but allows
CMake-based project generators to include the header files as well.

Previously headers without accompanying source files (like version.h)
were skipped when generating project files.
2016-03-27 22:22:58 +02:00
Michał Janiszewski d274abdcce Fixes for GCC
Makes jansson library required as well
2016-02-03 18:23:47 +00:00
Michał Janiszewski b7820c09cd Add docs to CPack-generated packages
Includes licence, contributors, readme, etc.
2016-01-25 11:17:25 +01:00
Michał Janiszewski 8599468760 Cleanup unused lodepng stuff 2016-01-23 17:13:15 +01:00
Michał Janiszewski abe6841e0b Update libraries 2016-01-21 00:01:03 +01:00
Michał Janiszewski 753d430eaa Add zlib-based compression and decompression 2016-01-20 15:30:59 +01:00
Michał Janiszewski b8b50684ba Bump CMakeLists' version to match other places 2016-01-17 16:19:54 +01:00
Michał Janiszewski e7ea6381cc Drop support for lodepng
All platforms can now use libpng 1.6
2016-01-09 21:50:08 +00:00
Michał Janiszewski ed8ac6f1cd Update CMakeLists.txt with new argparse location
Argparse library got merged into main repository, there's no need to
call out to it now.
2016-01-09 21:50:07 +00:00
Michał Janiszewski d29faf25c4 Remove tests
Tests were quite old, used very simple framework which did not allow
much fidelity and were probably never executed.
2016-01-09 21:50:06 +00:00
Michał Janiszewski db95b3ada3 Enable strict aliasing and make sure it gets spotted 2015-12-31 09:15:16 +01:00
Michał Janiszewski 94a3ccdab5 Detect libpng>=1.6 and fall back to lodepng 2015-12-30 13:36:15 +00:00
Michał Janiszewski 9321c53b87 Enable libpng on Linux builds
Lodepng is still available.
2015-12-30 13:34:51 +00:00
Michał Janiszewski c293572d3f Add SSL dependency from curl 2015-12-28 10:54:06 +01:00
Michał Janiszewski 8ebc3e7f85 Modify CMakeLists to enable STATIC support on Linux
This enables compilation with `-DSTATIC=ON` for native Linux builds.

Do note that Linux systems rarely come with static libraries, so it may
not be a popular option.
2015-12-28 10:10:13 +01:00
Michał Janiszewski f502b5ec1b Provide explicit option for static linkage
This solves woes of missing libraries on some systems by providing
user-accessible option to control static linkage.
2015-12-28 02:27:49 +01:00
Michał Janiszewski 6a5fc90cd4 Fix CMakeLists for MinGW cross-compilation
This makes sure that shared library built with MinGW toolchain is linked
statically to *all* its dependencies, including libc, libstdc++, libsdl2
and all the others. This allows producing of working `openrct2.dll` by
cross-compiling.

I hit a bug with libcrypto, a dependency of libssl, which in turn is a
dependency of curl, which creates a `DllMain` entrypoint for static lib
too, but since we don't do anything in ours, this should be safe.

I have only had chance to try it out when cross-compiling, ideally it
should be tested under Cygwin/MSYS too, but it is too bothersome to
setup for me.
2015-12-28 01:17:28 +01:00
Aaron van Geffen 43e193ba10 Remove FontConfig as a required module on OS X. 2015-12-25 14:32:49 +09:00
Michał Janiszewski 9b838aa0ee Add missing fontconfig lib for Travis and Docker 2015-12-25 01:53:53 +09:00
Aaron van Geffen dd604afc89 Use FontConfig to find suitable TrueType fonts on Linux and OS X. Fixes #2537. 2015-12-25 01:53:52 +09:00
Michał Janiszewski 3ba9ec8c81 CMake updates for packaging on Linux
This enables install and package targets for make.

You can specify installation prefix with -DCMAKE_INSTALL_PREFIX=path,
when doing `make install`, OpenRCT shall be found there.

You can also use `make package` for creating packaged release files.
2015-12-22 22:47:44 +01:00
Kyle Kirbatski 20df0a0be7 Add `.m` files 2015-12-17 11:52:57 -06:00
Gymnasiast 3db574b8bb Fix building in paths with spaces not working properly on Linux 2015-12-16 20:31:33 +01:00
Michał Janiszewski 7d132d8fe1 Extract and embed sections into binary itself
Fixed some CMakeLists.txt problems, made another target for converting
section images into something palatable by ld, modified the linker
script to place these ssection at predefined VMAs and updated openrct2.c
with new checks.
2015-12-16 19:16:27 +01:00
Michał Janiszewski 40059ced39 Add g2 target for easy generation 2015-12-12 23:28:56 +01:00
LRFLEW c9be2e1bc9 Resolved struct packing error and crash on OS X 2015-12-10 17:29:58 -06:00
Kyle Kirbatski af382b1884 Switched to -sectcreate instead of mmap on OS X 2015-12-10 16:32:46 -06:00
Michał Janiszewski 1bafbde113 Shift segments in Mach-O to outside of required AS
Mach-O defaults to having .text segment starting at 0x1000 RVA, which
clashes with the address space required for mmap to work properly.

This change tells linker to move the segment outside of required AS, and
then some, so that mmap can properly allocate required addresses without
evicting anything else.
2015-12-10 16:32:45 -06:00