51 Commits

Author SHA1 Message Date
Stephen E. Baker
1ddbbb4e35 Clean up obsolete cmake options (#2846)
* Remove remainder of VLD

Some components were left behind when I removed the cmake option for
vld.

* Remove USE_PRECOMPILED_DEPS option

Hasn't been maintained in 8 years. The use case has been replaced by
vcpkg.
2025-05-05 13:47:43 +03:00
Stephen E. Baker
f2204b4e17 Replace CopyVcpkgLua 2024-05-11 21:11:34 -04:00
Stephen E. Baker
d234034b1e Add linking lua modules 2024-05-11 21:11:34 -04:00
Stephen E. Baker
b9b831ce12 Switch to libcurl for update check
Removes dependence on undermaintained luasocket and luasec libraries.

As an additional benefit, update checks can now be disabled at build
time for distros that would prefer not to show it.
2024-04-21 17:07:09 -04:00
Stephen E. Baker
5c638a2dba Switch to external vcpkg with manifests
Adds support for independently versioning different vcpkg
dependendencies, better binary cache support, and external registries
for specific ports which are now used instead of forking for ffmpeg and
sdl2_mixer.

If you previously built using USE_VCPKG_DEPS you need to migrate
to the new build method.

1. Delete your CorsixTH/vcpkg directory.
2. Delete your build directory
3. Download and install vcpkg following the instructions at:
   https://learn.microsoft.com/en-us/vcpkg/get_started/get-started
4. Run `cmake --prefix dev`
5. Open the visual studio project for your new build directory at
   `./build/dev`
2024-02-18 13:40:52 -05:00
Toby Lane
6873af95ab Fix references to AnimView 2023-12-31 14:09:00 +00:00
Stephen E. Baker
03563195f4 Bump vcpkg 2023-08-31 20:21:47 -04:00
Stephen E. Baker
0a071f5cab Add fluidsync seek fix to vcpkg deps 2023-05-28 20:56:56 -04:00
Stephen E. Baker
dc30786961 Only build release dependencies appveyor
To cut down the build time when vcpkg cannot be loaded from cache.
2023-05-03 20:19:03 -04:00
Stephen E. Baker
8569bc2c34 Bump vcpkg
SDL2_Mixer has some vcpkg changes. native_midi is no longer an option
so fluidsynth is now defined. Midi will no longer work without a
soundfont specified e.g. with the SDL_SOUNDFONTS environment variable.

brotli 1.0.9#5
bzip2 1.0.8#4
catch2 3.3.2
dirent 1.23.2#2
ffmpeg 5.1.2#6
fluidsynth 2.3.2#2
freetype 2.12.1#3
gettext 0.21.1
glib 2.76.1#1
libffi 3.4.4#1
libflac 1.4.2
libiconv 1.17#1
libmodplug 0.8.9.0#10
libogg 1.3.5#1
libpng 1.6.39#1
libsndfile 1.2.0
libvorbis 1.3.7#2
lpeg 1.0.2#4
lua 5.4.4#7
luafilesystem 1.8.0#4
luasec 1.3.1
luasocket 3.1.0
mpg123 1.31.3
openssl 3.1.0#3
opus 1.4
opusfile 0.12+20221121#1
pcre2 10.40#1
pkgconf 1.8.0#5
sdl2-mixer 2.6.3#1
sdl2 2.26.5
yasm-tool-helper 2020-03-11#1
yasm-tool 2021-12-14
yasm 1.3.0#5
zlib 1.2.13
2023-05-03 20:14:34 -04:00
Stephen E. Baker
788b9819c8 Bump vcpkg commit tag
The biggest change is the bump from SDL2_mixer 2.0.4 to 2.6.1
flac, ogg vorbis, and mp3 support are now all built in without
extra libraries.

There is now a fluidsynth option for sdl2_mixer in vcpkg, but
this commit does not enable it.
2022-10-18 22:04:07 -04:00
Stephen E. Baker
7fa1f5feb1 Bump vcpkg to latest (#2161)
--recurse option seems to be required for install now
vcpkg now ships with a cmake config for Lua
Some libraries have changed names
2022-05-15 08:52:52 -04:00
Stephen E. Baker
6edf76d737 th_movie: Drop support for LibAV
No distributions have included LibAV for a number of years, the last
release was 3 years ago and the mailing lists are silent.
2021-06-16 23:13:49 -04:00
Stephen E. Baker
516d143a7c Bump vcpkg deps and add luasec
brotli                                 1.0.9#1
bzip2                                  1.0.8#1
catch2                                 2.13.1#1
ffmpeg                                 4.3.2#12
freetype                               2.10.4
libflac                                1.3.3#5
libmodplug                             0.8.9.0#7
libogg                                 1.3.4#3
libpng                                 1.6.37#14
libvorbis                              1.3.7#1
lpeg                                   1.0.2-1
lua                                    5.4.3#1
luafilesystem                          1.8.0-1
luasec                                 1.0.1
luasocket                              2020-09-14
mpg123                                 1.26.5
openssl                                1.1.1k#1
sdl2-mixer                             2.0.4#11
sdl2                                   2.0.14#4
zlib                                   1.2.11#10
2021-05-16 18:05:36 -04:00
Toby Lane
6b19d8ac72 Cmakelint changes 2020-09-21 15:50:22 +01:00
Stephen E. Baker
4d04d2e557 Fix lua files copied to the wrong path 2020-06-01 21:31:09 -04:00
Stephen E. Baker
9c24c865ae Handle current VCPKG and Visual Studio versions
SDL_mixer now requires dynamic_load unless building statically, and no
longer brings over the dynamic libraries it depends on automatically.

Visual Studio 2019 defaults to x64 instead of x86.

Vcpkg is available on more versions of Visual Studio, as well as Linux
and MacOS these days, though our CMake is still not compatible with
using it on non-windows platforms yet.
2020-05-29 23:48:07 -04:00
Toby Lane
a390da605c Cmakelists.txt and docs cleanup 2020-02-07 14:49:48 +00:00
Stephen E. Baker
ca13445f22 Bump vcpkg deps 2019-06-08 22:31:36 -04:00
Stephen E. Baker
810984d9bf Update vcpkg hash 2019-01-06 20:53:35 -05:00
Stephen E. Baker
a17c9240a6 Bump vcpkg commit 2018-05-30 22:35:17 -04:00
Stephen E. Baker
0d66708bec Fix doxygen for out of source builds 2018-02-08 21:33:39 -05:00
Stephen E. Baker
888da5b9d1 Drop FindLua.cmake as it is included in CMake 2018-01-11 17:12:49 -05:00
Stephen E. Baker
78bc74508c Move doc target to own file 2018-01-11 06:49:45 -05:00
Stephen E. Baker
5a27eee9b7 Remove DirectX related cmake scripts
We switched to SDL2 a long time ago.
2018-01-10 21:44:59 -05:00
Stephen E. Baker
6edc1926b6 Consistent style for CMake scripts 2018-01-10 21:44:59 -05:00
wolfy1339
5f76d5a026 Bump vcpkg SHA to support space in directories (#1319)
* Bump vcpkg SHA to support space in directories
2018-01-05 09:57:38 -05:00
Stephen E. Baker
a1bd36d6d3 Bump vcpkg commit
New version includes custom ffmpeg flags to reduce the size, and
bumps sdl2_mixer to 2.0.2 and sdl2 to 2.0.7, which fixes a regression
in the movie audio.
2017-11-14 21:16:36 -05:00
David Fairbrother
ef0c23866d Add script to build and package libs in MS vcpkg
This commit adds a new script which can be executed on
a Windows machine to build and package the libraries
for CorsixTH. A new folder called vcpkg will be created
in the same folder as the script. The script is
integrated into CMake and run by default when
targetting MSVC.
2017-11-10 21:41:30 -05:00
David Fairbrother
7ad371f57e Use CMake to pull in and use precompiled deps for Linux
This commit adds a new module which clones and automatically sets
the include and library paths for the precompiled dependencies.

Linux users can opt in however they must choose the final arch
(i.e. x86 or x64) they intend to compile against.
2017-11-10 21:35:21 -05:00
Phil Morrell
46420b766e Normalise lua version detection for cross-platform
This will make it easy to add future versions for all platforms:
* lua5x ??, presumably used by Visual Studio
* lua5.x used by debian-based linux distros
* lua-5.x ??, was there in 5.1
* liblua.5.x.dylib used by homebrew on OS X

The library order should be the same as the include order
2016-06-21 23:16:38 +01:00
Philip Morrell
d2842f23fa support lua5.2 in FindLua.cmake for deb packaging
rebase PlayDeb patch on latest 0.60-beta1 release for use in official debian package: https://tracker.debian.org/pkg/corsix-th

Author: Christoph Korn <christoph.korn@getdeb.net>
Origin: 24d441933c (diff-f68957b6e9561c95afdd68f41343ff97)
Reviewed-by: Phil Morrell <debian@emorrp1.name>
Last-Update: 2016-04-17
2016-04-17 01:45:08 +01:00
Alexandre Detiste
4c4261fe67 typos
This doesn't impact translated strings at all;
mostly code comments/README/& one error message.

But now the next time someone runs "codespell"
he'll find important typos faster.
2016-02-29 15:31:44 +01:00
wolfy1339
a38ef4e160 Fix some spelling issues introoduced in #962
- Lua is not an accronym
- Fix the error message given when the Lua library cannot be found
2016-01-21 19:06:29 -05:00
Matt Smollinger
79af719122 Fix Lua CMake To Find Lua On OS X systems
This update adds additional search directories valid for homebrew installed versions of Lua on OS X platforms.
Also included are two additional failure errors for more specific messaging about what fails to be found.
2016-01-02 08:28:53 -05:00
timdiels
1a9405e6af Generate documentation for CorsixTH with make doc
Generate reference doc for CorsixTH, AnimView, LevelEdit, MapEdit with doxygen.
Allow LDocGen to generate documentation in any working directory.
Upload documentation to web with TravisCI.

Corrections to the original pull request contributed by:
Alberth <alberth289346@gmail.com>
2015-04-15 19:45:08 -04:00
Stephen E. Baker
1b7f2b280a Make FindLua more flexible for finding different versions and namings 2015-04-02 20:33:53 -04:00
Stephen E. Baker
f445d049e2 Add support for Visual Leak Detector for Visual Studio
A library that detects memory leaks at run time for Visual Studio.
The library can be enabled in cmake with WITH_VLD.

Get Visual Leak Detector at https://vld.codeplex.com
2015-04-02 20:11:56 +02:00
Alexander Bessman
7b3976732b FindFFmpeg/FindLibAV: Move macros to separate file 2015-03-01 12:57:47 +01:00
Alexander Bessman
d02deff725 FindFFmpeg/FindLibAV: Improve version detection 2015-02-28 10:25:03 +01:00
Alexander Bessman
b81720945e Fix wrong header location 2015-02-27 20:29:16 +01:00
Alexander Bessman
44f1ba71a0 Do not use pkg-config to find FFmpeg/Libav on Unix 2015-02-27 19:18:56 +01:00
Edvin
19e2ad1141 Merge pull request #621 from TheCycoONE/libavresample
Support playing movies with libav and fix ffmpeg audio stutter
2015-02-04 16:50:03 +01:00
wolfy1339
b9c46d4d21 Move SDL_Mixer from advanced view 2015-02-02 22:56:11 -05:00
Stephen E. Baker
8dc72bd609 Support playing movies with libav
Makes libav an optional alternative to ffmpeg, selected in cmake.

The intro movie plays perfectly with this libav code.
2015-02-02 19:18:35 -05:00
Stephen Baker
d0d9e75ef7 Merge remote-tracking branch 'upstream/master' into sdl2
Resolved conflicts in:
	CorsixTH/Lua/config_finder.lua
	CorsixTH/Lua/game_ui.lua
	CorsixTH/Lua/ui.lua
	CorsixTH/Src/th_gfx_sdl.h
2014-01-11 23:12:21 -05:00
Edvin Linge
6084f97a95 Let CMake look for either Lua or LuaJIT depending on the new flag WITH_LUAJIT 2013-11-02 09:19:57 +01:00
Jørgen P. Tjernø
eff6d6c237 CMake changes for SDL2. 2013-08-25 12:06:34 -07:00
Stephen E. Baker
b50e976e2b Move FFmpeg components out of advanced view because they need to be set on Windows 2013-01-13 18:41:36 +00:00
Stephen E. Baker
22f302c115 Adds original movies from Theme Hospital to CorsixTH. See issue 1428 for more information. 2013-01-11 03:17:58 +00:00