Commit graph

47 commits

Author SHA1 Message Date
Clownacy
5b89a31976 Split bin2h to its own CMake file
Also added warnings to its part of the Makefile
2019-05-23 19:42:52 +01:00
Clownacy
7db42b0b72 Set bin2h to C90 in the CMake file
Done to match the Makefile
2019-05-23 11:36:41 +00:00
Clownacy
609d54916b Renamed debug builds to 'CSE2_debug' and 'DoConfig_debug'
Makes a bit more sense than 'CSE2d' and 'DoConfigd'
2019-05-22 00:29:16 +00:00
Clownacy
e925880f5b Fixed VS 2017 WinXP builds when using local libs
Turns out vcpkg enables this for its build too.
2019-05-08 15:06:51 +01:00
Clownacy
6ef6f0f5c0 Tweak how FORCE_LOCAL_LIBS works 2019-05-05 14:19:40 +01:00
Clownacy
a6ac6787d3 Embed the fonts in the EXE
Now CSE2.exe should be drop-in replacement for Doukutsu.exe, with
no extra files needed.
2019-05-05 14:03:16 +01:00
Clownacy
6dc85875ff Changed output executable naming scheme
Now the Makefile and CMake build systems are identical:

Release builds are named CSE2, and debug builds are named CSE2d.

Language no longer has an effect on filename for the Makefile.
2019-05-05 03:14:58 +01:00
Clownacy
36119082d2 Remove CMAKE_BUILD_TYPE defaulting
It's annoying, but vcpkg *really* didn't agree with it (it would just
build Debug anyway). The instructions provided with the repo already
tell you to manually define Release builds anyway.
2019-05-05 02:55:54 +01:00
Clownacy
ddf61dd791 Added Wave.dat's original file extension
beebd77d73/source/Sound.cpp (L477)

Thank goodness for the Org2 source release
2019-05-05 02:20:37 +01:00
Clownacy
d2f1b2c1a9 Renamed some of the resource files
The Linux port's get_resource function seems to be using the original
filenames, rather than the 8.3 filenames used by the Windows EXE's
resource system. Too bad it doesn't tell us the original file extensions.
2019-05-04 18:26:41 +01:00
Clownacy
6288ec0355 Made DoConfig self-contained 2019-05-02 18:20:47 +01:00
Clownacy
5c339ef686 ...Static-link MSVC CRT properly 2019-04-29 23:21:52 +01:00
Clownacy
12b6fad997 Made MSVC static-link the CRT 2019-04-29 22:11:47 +01:00
Clownacy
fdb2177879 Add missing options to the readme 2019-04-29 14:36:18 +01:00
Clownacy
58d7fb2ca7 Some more CMake fixes 2019-04-26 05:13:50 +01:00
Clownacy
469c25c93d Added FORCE_LOCAL_LIBS option
This forces CMake to use the local libraries, even if system libs
are readily available. This is useful for MSYS2, since find_package
would link dynamic libraries, but local libraries are static.
2019-04-26 04:17:29 +01:00
Clownacy
5272861330 Remove leftover debug print 2019-04-26 03:42:36 +01:00
Clownacy
896b09f336 Fixed some CMake problems that were preventing builds on Windows
FLTK kinda sucks
2019-04-26 02:50:23 +01:00
Clownacy
ac465d29b4 Mean CMake dependency overhaul
I'm taking a page from Dolphin's book, and including copies of each
dependency's source code. This combines the ease of use of including
pre-built libraries instead of needing to navigate a package manager
 - as is (or was) the case for MSVC - with the portability of using
packages. Granted, this method's more of a jack of all trades,
master of none, since it's *less* user-friendly than prebuilt
packages (compilation times), and you don't get the per-distro
compatibility fixes you'd get from a package manager.

You can still use system libs if you want. In fact, it's still the
default behaviour: compiling the libs manually is just a fallback.
I'll add an option to force-enable this soon, however, since it's a
nicer way to produce static MSYS2 builds than the hackish nightmare
that I was using before. Not to mention, having my own copy of the
sources means I can provide my own fixes and tweaks your package
manager may not. For example, I can combine MSYS2's FreeType
subpixel rendering with vcpkg's fix for SDL2 exporting its symbols
in static builds.
2019-04-26 01:52:02 +01:00
Clownacy
07c5734498 Tweaked CMake file 2019-04-25 22:31:13 +01:00
Clownacy
090ae9f6ce Fix FLTK not finding its headers
Stupid FLTK_INCLUDE_DIR not being called FLTK_INCLUDE_DIRS like a normal
library
2019-04-25 19:02:04 +01:00
Clownacy
83d444c8d4 Added missing RUNTIME_OUTPUT_DIRECTORY setting in CMake file 2019-04-20 19:02:45 +01:00
Clownacy
2bf46dc700 A bunch of CMake file cleanup 2019-04-20 05:15:01 +01:00
Clownacy
014d128396 Remove the STATIC option from the CMake file
Instead it just automatically does static linking if it detects MSYS
2019-04-20 04:43:56 +01:00
Clownacy
5cf7c95dd7 Added DoConfig (clone, not a decompilation)
Right now only the CMake file builds it
2019-04-20 04:43:38 +01:00
Clownacy
3d3d6a2179 Make CMake output executables to the build_en/build_jp folders
MSVC copies SDL2.dll across too
2019-04-20 01:09:53 +01:00
Clownacy
33254c87dd Shut up MSVC's stupid warnings when using the CMake file 2019-04-19 17:37:10 +01:00
Clownacy
5a3e641492 Do the last commit except less stupid 2019-04-18 20:15:46 +01:00
Clownacy
eb11c7798d ...Do the previous commit only less stupid 2019-04-18 20:08:33 +01:00
Clownacy
2a9e8bd8cc Autodetect Raspberry Pi in CMake file
...instead of expecting the user to manually-define it
2019-04-18 20:04:49 +01:00
Clownacy
7e038bc24a Fix backwards-incompatible CMake nonsense 2019-04-16 18:57:55 +01:00
Clownacy
9effc5e0fe Lowered CMake minimum requirement to 3.7.2
Tested on Raspbian
2019-04-16 17:42:42 +00:00
Clownacy
e2ed9ad950 Okay, forget all that. Generating an output folder was stupid. 2019-04-14 18:25:12 +01:00
Clownacy
2c8ccc5a0b Actually, only generate the output folder during cmake's config stage 2019-04-14 04:14:45 +01:00
Clownacy
5ec9fea302 The build folder is now automatically generated
This way, we don't need to tell everyone who uses the enhanced branch
that they need to copy res/data_en. It also gives the CMake project a
way to bundle everything into a neat little folder.
2019-04-14 03:36:57 +01:00
Clownacy
4d9bc0a65f Remove the WINDOWS CMake option, and just detect Windows instead
Also remove the STATIC option from MSVC because why wouldn't you
2019-04-13 21:25:46 +01:00
Clownacy
bde0c979ff More CMake improvements (also FreeType is a static lib now)
The official(?) binaries weren't statically-linked, and being compiled
with MSVC2017 probably meant they weren't compatible with old OSes
anyway.

So now, the 32-bit one's compiled with MSVC2003. The other's still
MSVC2017 though. While I was at it, I made them both static. *Also*
while I was at it, I made sure subpixel-rendering was enabled.
2019-04-13 20:30:20 +01:00
Clownacy
ea6f67f87c CMake fixes 2019-04-13 18:04:17 +01:00
Clownacy
3e67b54d6f Make MSVC static linkage optional 2019-04-11 21:33:21 +01:00
Clownacy
5002e68be7 Disable the Windows console window explicitly on all backends
Not just MSVC
2019-04-11 02:10:31 +01:00
Clownacy
e866d7bd9b cmake tweaks 2019-04-11 01:15:50 +01:00
Clownacy
c63646e798 Got cmake file working on Arch
cmake why you so bad
2019-04-10 17:00:42 +01:00
Clownacy
f249f8c604 Added link-time optimisation to cmake file 2019-04-10 01:42:17 +01:00
Clownacy
e54c13e22f More cmake improvements
Added static build, notably
2019-04-10 01:12:23 +01:00
Clownacy
5261e6063d Add Windows icon support to cmake project 2019-04-09 22:29:06 +01:00
Clownacy
01297eab42 Add build options to the cmake project, and updated the README to note
the new Visual Studio 2003 directory location
2019-04-09 22:06:36 +01:00
Clownacy
39da44e899 Added cmake build setup 2019-04-09 21:38:25 +01:00