6 Commits

Author SHA1 Message Date
Roman Fomin
ab708171f3 cmake: delete unused code, cosmetic changes 2023-04-29 10:21:44 +07:00
Roman Fomin
7be859730a
clean up in build system (#869)
* Restore FindSDL2* modules, use CMAKE_FIND_PACKAGE_PREFER_CONFIG

* Rename FluidSynth::FluidSynth->FluidSynth::libfluidsynth for compatibility
  with provided config

* Don't use SDL2_MAIN_LIBRARY variable
2023-01-12 08:32:17 +07:00
Roman Fomin
4a404d8aae move FindSDL2*.cmake modules to cmake/SDL2 directory
Use our modules only if vcpkg is not present.
2022-12-30 22:11:26 +07:00
Roman Fomin
b69852fb07
switch to vcpkg for MSVC build (#855)
* switch to vcpkg for MSVC build

* Remove library downloads and install in MSYS2 environment.

* Add vcpkg.json with dependencies.

* add vcpkg to CI

* fix parallel linking conflict (files with the same name)

* use vcpkg targets (fix debug build)

* delete cross compilation toolchain files, update README.md

* switch to ninja for MSVC build

* turn off MSYS2 update

* use binary caching feature, save to GitHub using NuGet backend

* This works much more robust, also it's recommended method:
  https://github.com/microsoft/vcpkg/blob/master/docs/users/binarycaching.md

* move MSVC workflow to separate file, don't run it on pull request
2022-12-30 20:44:59 +07:00
Alex Mayfield
7673f246b2
CMake build fixes (#65)
* Only expose DLL directory instead of globbing all of them

The old way didn't work when mingw libraries were installed from
packages, like with MSYS2.  Not quite done yet, though, since I don't
know which DLL files we need from SDL2_mixer.

* Fix dl_FOUND not being properly set

* Revert "Fix dl_FOUND not being properly set"

This reverts commit 832eb25f826ca88063a87585a373156e37fe364e.

* Add DLL files for SDL_mixer

* Download SDL libraries automatically on Windows

* Add SDL2_image and link against zlib

On Windows, we compile our own zlib.  Still need to get mingw worked
out, though.

* Fixes for the SDL_image finder

Missed a few instances of NET in my copy-paste.

* Fix mingw compilation

* Use our compiled zlib instead of SDL_image's

Also do some general cleanup and fixes, too many to enumerate.

* Remove unneeded error

* MSVC fixes

- Don't avoid the external project on subsequent cache generations.
- If no toolchain is in use, don't attempt to make an absolute path to
  it.

* Add a hash for zlib

* Properly handle multi-config build systems with zlib

* Ignore unused cache vars with zlib build

* Build and install only the zlib dynamic library

* Fix up zlib installer to work on MSVC

* Update README, move cross-compile toolchains

Moving them to the root directory makes it more obvious they're intended
to be used by end-users.

Fixes #61
2020-03-12 13:51:22 +01:00
Alex Mayfield
b13b8fc415
CMake Build System (#48)
* First stab at CMake

It builds on Linux, and cross-compiles to Windows as well using the
provided toolchain files.  convert-icon is also fixed up with argument
count checking and modern format strings, along with all flake8 warnings
fixed.

* Fix Visual Studio compilation

* Add a newline to gitignore

* Build system updates

- Add documentation.
- Add options for defines.
- Automatically copy DLL files to binary directory.
- Add preliminary CPack support which packages the binary plus docs and
  DLL files.

* Fix SDL2_FILES conditional

* Build Windows and Linux packages

We use our own Python script instead of unix2dos.  Also, a few other
random fixes came along for the ride.

* Fix up warnings and defines on MSVC

* Update Travis to use CMake

* Remove automake and autoconf files

* Yet more build system updates

- Add docs, examples, and desktop stuff to binary packages.
- Get rid of HAVE_CONFIG_H.
- Change HAVE_DLOPEN to something more CMake-like.
- Add optional targets for most of the tools.

* Ignore files for source package

* Add to README file

* Get rid of BETA, DOGS, and fix another Automake straggler

* Prevent in-tree builds

Fixes #21
2020-02-03 12:11:31 +01:00