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.
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
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.
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.
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.
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.