Commit Graph

246 Commits

Author SHA1 Message Date
Sasha Szpakowski f5cfaaf30d Merge pull request #2036 from bartbes/modernize-cmake
Modernize cmake builds
2024-03-30 10:02:05 -03:00
Bart van Strien 60156347a2 Downgrade minimum cmake version to 3.16
Which matches SDL3 and ubuntu 20.04.
I checked the release notes, there were no relevant changed in 3.17 and 3.18.
2024-03-30 13:46:00 +01:00
Sasha Szpakowski 42e653b6a6 Fix cmake build... 2024-03-25 21:07:05 -03:00
Sasha Szpakowski 5ded7ed4d3 Add new (temporary) JoystickSDL3 file to build projects. 2024-03-25 21:01:05 -03:00
Miku AuahDark 681d694f9d Allow LuaJIT to be used on Windows ARM64. 2024-03-21 11:24:51 +08:00
Bart van Strien 89cffddb15 Build each module as its own static library
Which means everything still mostly behaves the same, except we now have
cmake targets which we can manipulate, rather than a bunch of global
variables.

For ease of use I've matched the existing variables, so love.event is
split into love_event_root and love_event_sdl, and there is a separate
(pseudo) target love_event which combines them both.

I have also simplified the windows-specific additions to liblove.
Instead of altering the variables, they now just add to the liblove
target.

Unfortunately, it does mean we lose the global include directory list,
so we need to add dependencies on a per-module basis. The upside is that
this more accurately models the dependencies. If you remove a module,
its dependencies should now automatically go unused.
2024-03-10 14:41:28 +01:00
Bart van Strien 032e30b8ef Use custom targets for dependencies
Not the most beautiful system, but provides us with a simple way to
unify megasource and non-megasource builds.

Also replaces LOVE_LUA_LIBRARY, since we now have a target to name.
2024-03-10 14:41:28 +01:00
Bart van Strien e21fd60677 Fix and simplify love_disable_warnings
It just re-implemented target_compile_options.

While I was editing it anyway, call it closer to the target definition,
so it's easier to find.
And as it turns out, after diffing, love_disable_warnings only disabled
warnings on the first target anyway, so I guess this fixes a "bug".
2024-03-10 14:41:28 +01:00
Bart van Strien 7e0cdfc5ed Simplify definition of 3rd-party libraries
They (mostly) called add_library anyway, the extra indirection of all
those variables had no real value.

For header-only libraries I've left the definitions in there, in
comments. That may not do anything, but the previous definition of
unused variables had no effect either.
2024-03-10 14:41:28 +01:00
Bart van Strien 12f57109e1 Build separate love target on android too
Instead of smushing love.cpp into liblove and having an extra "codepath" for that, just build the love target as a shared library.
2024-03-10 14:41:28 +01:00
Bart van Strien fa5566e7d4 Use fixed cmake target names and set OUTPUT_NAME instead
That means we can still change the target name, while having consistent names throughout the file.
And while I'm at it, deal with the version number in the library name for linux in the same code path.
Also upgrade the variables to cache variables, so you can easily change the names. This was previously impossible because they were target names.
2024-03-10 14:41:28 +01:00
Bart van Strien 5ebb6f1c70 Determine version string earlier
So I can use it in the upcoming commits.
2024-03-10 14:41:28 +01:00
Bart van Strien cd5fc414a1 Update minimum cmake version
Not necessarily needed yet, but given our target platforms, this seems
like a sane minimum version. Also means we don't need the separate
policy settings, since the new minimum version already enables the new
behaviour.
2024-03-10 14:41:28 +01:00
Bart van Strien 718475aef6 Fix indentation in CMakeLists
Was mostly using tabs, so replace the few lines that used spaces.
2024-03-10 14:41:28 +01:00
Sasha Szpakowski 64a30f177f Merge branch 'main' into 12.0-development 2024-02-10 12:24:48 -04:00
Sasha Szpakowski 94d5864144 update year for copyright notice 2024-02-10 12:13:22 -04:00
Miku AuahDark 5acc98ce43 Remove unnecessary CMake modules.
* Compiling without find_package(OpenGL REQUIRED) has no side-effect because LOVE uses SDL to load OpenGL. GLAD is used to as substitute for OpenGL headers too.
* Mpg123 is no longer used in LOVE 12. Remove the respective CMake module.
* CMake has its own FindOpenAL.cmake script. There's no need to provide our own.
2024-01-29 19:13:44 +08:00
Bart van Strien dc8391397e Merge remote-tracking branch 'origin/12.0-development' into remove-autotools 2024-01-28 11:58:26 +01:00
Sasha Szpakowski 904ab47d1f Fix cmake project 2024-01-07 21:22:43 -04:00
Sasha Szpakowski a99d5afc57 update glslang 2024-01-07 21:14:01 -04:00
Bart van Strien ac9ee9d3c7 Update debian package files for cmake variables
And automatically get the timestamp for the changelog too.
That does require an update to cmake 3.7, but as far as I can tell we never use a cmake version older than 3.16 (ubuntu 20.04).
2024-01-06 13:04:19 +01:00
Bart van Strien d7f29c8860 Use correct library name on linux
Not libliblove.so, but liblove-12.0.so, like with autotools.
Note that no liblove.so symlink is created.
2023-12-31 13:57:51 +01:00
Bart van Strien 5c0e4d0b62 Add linux install commands to cmake 2023-12-31 13:28:09 +01:00
Bart van Strien 84982ff4ef Generate love.desktop using CMake too
Since I cannot easily change the variable used there, update the autotools codepath to insert the CMake variable.
2023-12-31 12:56:38 +01:00
Bart van Strien 0302e0f2ac Generate debian package files with cmake
Used for the ppa builds, so it's nice if they still work.
2023-12-31 12:48:40 +01:00
Bart van Strien 83f1a926bf Make OS-check for install/cpack cmake targets more explicit
Previously there was an early return, trying to match the same thing.
Making this explicit allows me to more easily add a linux version.
2023-12-31 12:36:25 +01:00
Sasha Szpakowski 8951635abc Merge branch 'main' into 12.0-development 2023-12-02 13:40:49 -04:00
Sewbacca 76fcc5bc3d MinGW: Support utf-16 encoded love.rc 2023-11-28 16:11:07 +01:00
Sewbacca 11d4bdd1a3 Add support for MinGW 2023-11-26 15:00:34 +01:00
Sasha Szpakowski ac9ae82524 love.physics: simplify Body and Shape API.
#1130

- Shapes are now directly attached to Bodies when they're created (similar to love 0.7 and older).
- Fixtures are removed.
- All methods that were in Fixtures now exist in Shapes.
- All APIs that used or returned a Fixture now do the same with a Shape.

- Add new love.physics.new*Shape variants that take a Body as the first parameter.
- Deprecate the new*Shape APIs that don't take a Body.
- Deprecate love.physics.newFixture (the deprecated function now returns a Shape).
- Replace Body:getFixture and Body:getFixtures with Body:getShape and Body:getShapes (Body:getFixtures is deprecated).
- Replace World:queryFixturesInArea and World:getFixturesInArea with World:queryShapesInArea and World:getShapesInArea (queryFixturesInArea is deprecated).
- Replace Contact:getFixtures with Contact:getShapes (Contact:getFixtures is deprecated).
- Replace all love.physics callback Fixture parameters with Shape parameters.
- Deprecate ChainShape:getChildEdge.
2023-10-07 15:17:24 -03:00
Miku AuahDark f43c6fedeb Add physfs_platform_android.cpp as source files. 2023-09-28 15:54:36 +08:00
Sasha Szpakowski ddf88c64bd Update lua-https to latest commit (love2d/lua-https@6dbce69) 2023-08-30 21:47:26 -03:00
Sasha Szpakowski 6e80d85110 Merge branch 'main' into 12.0-development 2023-08-19 21:35:55 -03:00
Henry Goschütz 662c01ff9d Fix reference to old 'macosx.mm' 2023-07-10 23:37:32 +02:00
Joel Schumacher efc54d5124 Add PHYSFS_Io StripSuffixIo to skip codesign signatures
When a fused löve executable is signed with codesign on Windows some
data is appended to the executable, preventing physfs from finding the
zip file at the end of the file.
To help physfs out a bit, we try to find the zip ourselves in the case
of regular mount failure by looking for it's characteristic end of
central directory record and, once found, pretend to physfs that the
file is shorter than it actually is and ends at the end of the zip file.
2023-05-18 13:57:07 +02:00
Er2 94daeea31e Add FindHarfbuzz.cmake 2023-02-11 16:56:58 +00:00
Sasha Szpakowski d085f44e6a Merge branch '12.0-development' into text-shaping 2023-01-01 12:18:54 -04:00
Sasha Szpakowski 74f884b41f Merge branch 'main' into 12.0-development 2023-01-01 10:57:32 -04:00
Miku AuahDark 0b0ff5551f Hide symbol visibility in CMake and Android.mk. 2023-01-01 15:16:26 +08:00
Miku AuahDark 3a49dc555a Fix megasource link. 2023-01-01 14:46:25 +08:00
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04:00
Sasha Szpakowski 7a0f6621e7 Initial (WIP) Harfbuzz text shaping integration.
This a significant refactor / rewrite of much of the love.graphics Font code.
Text positioning is now split into TextShaper classes in the love.font module. This isn't exposed to users yet.
BMFonts and ImageFonts use the same text shaping as before (in the new TextShaper API). Fonts loaded via FreeType now use Harfbuzz for text shaping.

The new code isn't at feature-parity with the old code yet. Harfbuzz-based text shaping enables kerning support in more fonts, character combining into ligature glyphs, and directions other than left-to-right (this isn't supported in love yet).
2022-12-26 19:06:08 -04:00
Sasha Szpakowski f17d3d94f1 Rename love.graphics Text objects to TextBatch.
The name Text is too generic compared to what they're designed for, it made people unnecessarily confused about their purpose.
2022-12-08 18:46:44 -04:00
Miku AuahDark 93612a84d1 Bump minimum SDL version to 2.0.9 2022-12-06 14:19:53 +08:00
Miku AuahDark 8f7eac4fde Initial sensor module. 2022-12-05 13:33:04 +08:00
niki e95319873c Merge remote-tracking branch 'upstream/12.0-development' into 12.0-development 2022-10-25 13:52:35 +02:00
Miku AuahDark 9deaa06a73 Windows: Slight changes to ARM64 support.
* Disable NSIS installer if we're compiling for Windows ARM64.
* Allow arbitrary files to be added as LOVE_EXTRA_DLLS
2022-10-17 00:28:07 +08:00
niki 302420de23 remove vulkan requirement from cmake 2022-10-15 14:57:32 +02:00
Miku AuahDark 857cf40636 LuaSocket: Enable Unix sockets in Windows 2022-10-08 13:21:56 +08:00