Commit Graph

271 Commits

Author SHA1 Message Date
Sasha Szpakowski 20aeabc384 Merge pull request #2339 from MikuAuahDark/swebp
Add WebP Image Support
2026-07-29 22:38:56 -03:00
Sasha Szpakowski b392d21536 update glslang to slime73/glslang@72d1590 (16.3.0 plus fixes for love) 2026-07-24 16:50:17 -03:00
Miku AuahDark a5b2085c86 Add WebP image support. 2026-07-18 16:26:42 +08:00
TotoEnF5 82ceb3121f Add QOI image format support 2026-07-15 11:11:14 +02:00
Sasha Szpakowski 515cae1818 windows cmake: convert path separators to cmake's expected ones when installing extra dlls 2026-06-13 15:58:26 -03:00
John Doe fc5eeb11a3 Fix copyright notice date 2026-01-21 18:49:11 +00:00
John Doe 6f08eb94c6 Update copyright notice with correct year 2025-07-12 23:19:22 +01:00
John Doe ef48405d72 Update cmake minimum version to 3.19 2025-07-12 16:40:47 +01:00
Sasha Szpakowski 1f1728c333 update glslang to KhronosGroup/glslang@05cfcc1
Fixes #2194.
2025-06-15 16:16:26 -03:00
Miku AuahDark 8beb7f0e4b Do not include SDL_iostream.h in NativeFile.h. 2025-01-05 12:00:23 +08:00
Miku AuahDark 4029df5a13 Replace NativeFile to use SDL IO functions.
Also remove Android-specific code from it as SDL is now able to handle them.
2025-01-05 12:00:23 +08:00
Miku AuahDark 3963265939 CMake: Remove SDL2->SDL3 transition leftovers.
Fixes #2132.
2025-01-02 13:52:03 +08:00
Sasha Szpakowski 639580cbd1 Add opt-in support for trackpad touch events. Add touch device types.
- Add new touch device type enum ("touchscreen", "touchpad", "touchpadrelative"). Coordinates for touchscreens are window-relative DPI-scaled pixels, and coordinates for touchpads are normalized [0, 1] values.
- Add new devicetype enum and ismouse boolean params to touch callbacks.
- Add love.touch.getDeviceType(touchid), love.touch.isMouse(touchid), and optional device type filter param for love.touch.getTouches.
- Add t.trackpadtouch boolean (defaults to false) to love.conf. Trackpad touch events will not be generated unless it's enabled.

Currently the trackpadtouch setting only works on macOS.

Resolves #1633.
Resolves #2093.
2024-12-25 13:15:17 -04:00
Sasha Szpakowski d2d8792ca4 fix cmake error 2024-10-18 20:32:53 -03:00
Sasha Szpakowski 337d8fa048 remove source code support for SDL2 2024-10-18 20:22:26 -03:00
Sasha Szpakowski 56c75170ef cmake: find SDL3 on linux 2024-10-14 17:35:12 -03:00
Sasha Szpakowski 74a44883fa fix SDL3.dll not being included in the zip/installer on Windows 2024-10-13 09:20:27 -03:00
Sasha Szpakowski de99a8ff64 update cmakelists 2024-08-10 18:11:04 -03:00
Sasha Szpakowski 0e517c286a windows installer: enable option to add love to the user's PATH
resolves #883
2024-07-01 22:56:07 -03:00
Mark Jansen ce173dd89b Group liblove and lovedep projects in Visual Studio 2024-06-17 10:18:48 +02:00
Ryan Carsten Schmidt e26106222a On macOS/iOS, use apple.mm, macos.mm and/os ios.mm
Fixes #2068
2024-05-10 01:27:41 -05:00
Ryan Carsten Schmidt 2c23b16556 On macOS/iOS, use Metal instead of Vulkan
See #2066
See #2068
2024-05-10 01:24:48 -05:00
Ryan Carsten Schmidt ce03fb839a Add -fobjc-arc for love_3p_luahttps on macOS
Fixes error: "ARC is off"
2024-05-08 22:46:57 -05:00
Mark Jansen 09e8830a87 Add support for SDL3 when building with megasource 2024-04-17 22:56:53 +02:00
Mark Jansen 93c77a7798 Add lua files to CMakeLists.txt
This makes them show up in Visual Studio.
2024-03-30 18:03:22 +01:00
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