This PR adds CMake support as an alternative building method for all supported platforms / toolchains. As a bonus, we can now build on Windows with MSVC 🎉 (I'd tested with VS2019).
Here are the limitations:
On Windows, the path to SDL2 cmake config file has to be manually assigned through command line (i.e. -Dsdl2_DIR=...)
Even if you're using MSVC (on Windows), it still depends on Mingw version of SDL2, since it has a different include folder hierarchy than the SDL2 for MSVC.
On Mac OSX, due to the fact that user can change the install prefix (i.e. CMAKE_INSTALL_PREFIX) basically anytime, it's hard to materialize lwp.plist until installation time, and thus makes it difficult to model install-launchd as a build target like what Makefile does. As a workaround, if the user wants to install to launchd, they have to set LWP_INSTALL_LAUNCHD variable to ON (either during configuration time or installation time via, says cmake_install.cmake).
This PR adds CMake support as an alternative building method for all supported platforms / toolchains. As a bonus, we can now build on Windows with MSVC 🎉 (I'd tested with VS2019).
Here are the limitations:
-Dsdl2_DIR=...
)CMAKE_INSTALL_PREFIX
) basically anytime, it's hard to materializelwp.plist
until installation time, and thus makes it difficult to modelinstall-launchd
as a build target like what Makefile does. As a workaround, if the user wants to install to launchd, they have to setLWP_INSTALL_LAUNCHD
variable to ON (either during configuration time or installation time via, sayscmake_install.cmake
).