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.
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.
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".
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.
We add the subdirectory AL to the include paths, so our includes should be relative to that. Presumably it would previously work with the wrong paths because some other library would be there.
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.
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.
- removed assertPixels()
- added exportImg() to help graphics test writing (sets the "expected" image for the test)
- added "deflate" variants to love.data.compress()
- added custom error handler so that love is closed if a crash occurs rather than hang on the graphic screen (for runner crashes mainly)
- updated missing functions left todo in todo.md and removed list from readme.md to make it easier to keep track of
- added love.audio.getPlaybackDevice(), love.audio.getPlaybackDevices(), love.audio.setPlaybackDevice()
- added love.data.ByteData:setString()
- added love.filesystem.getFullCommonPath(), love.filesystem.mountFullPath(), love.filesystem.unmountFullPath(), love.filesystem.moundCommonPath(), plus optional b/t/bt params to love.filesystem.load()
- added love.keyboard.isModifierActive()
- added love.sound.SoundData:copy() and love.sound.SoundData:slice()
- added love.graphics.Texture:isCanvas() and love.graphics.Texture:isComputeWritable()
- added love.image.ImageData:isLinear(), love.image.ImageData:setLinear(), and love.image.ImageData:encode("*.exr")
- added love.image.CompressedImageData:isLinear() and love.image.CompressedImageData:setLinear()
- added love.system.getPreferredLocales()
- added love.window.focus() and removed love.window.close() (now deprecated)