79 Commits

Author SHA1 Message Date
Michael b054ef0ecc CREATE_PROJECT: use C++11-style for each loops instead of iterators 2026-02-11 01:28:21 +02:00
Dries Harnie 49d59dfa2c CREATE_PROJECT: Improvements to CMake generation
- Support multi-config generators
- Add homebrew prefix for ARM MacOS by default
2026-01-21 02:47:31 +03:00
Le Philousophe 96be501f58 CREATE_PROJECT: Remove useless attribute from ProjectProvider
Move it to MSVC where it's really needed.
2025-11-20 20:25:37 +01:00
SupSuper 3cfaa9506e CREATE_PROJECT: Add support for SDL3 2025-06-15 23:26:58 +03:00
Orgad Shaneh 6ad2e5d337 CREATE_PROJECT: Disable NDEBUG for cmake
ScummVM makes heavy use of assert, and having NDEBUG defined makes it no-op.

Inspired by https://github.com/llvm/llvm-project/blob/1f7885cf9c68/llvm/cmake/modules/HandleLLVMOptions.cmake#L118
2025-06-01 09:43:41 +03:00
Orgad Shaneh e472be2ee4 BUILD: Suppress stringop-overflow and stringop-truncation GCC warnings
Too many false-positives.
2025-05-21 10:20:29 +03:00
Orgad Shaneh 3e3589cf70 CREATE_PROJECT: Set RELEASE_BUILD also for cmake 2025-05-05 15:56:14 +03:00
Orgad Shaneh 64c2072ce2 CREATE_PROJECT: Fix include order for cmake projects
If the engines directory contains plugins_table.h or detection_table.h
from an in-source build, when building out-of-source, these files from
the source directory were prioritized over build directory versions.

This caused issues when different plugins were enabled across builds.

The revised include order now matches the implementation in Makefile.
2025-04-25 20:33:19 +03:00
Orgad Shaneh 063209a962 BUILD: Fix build on mingw with libcurl
waitOnSocket in socket.cpp uses select, which is implemented in ws2_32.
2025-01-03 08:28:44 +01:00
Filippos Karapetis 1b9398f3e0 CREATE_PROJECT: Fix the MPC decoder feature name 2024-12-27 02:27:03 +02:00
Le Philousophe 0dfc71322a CONFIGURE: Add a 3D feature
This allows to blacklist 3D engines on platforms not supporting 3D.
These platforms don't have OpenGL nor TinyGL enabled.
2024-12-01 22:39:32 +01:00
SupSuper 92cbe01360 CREATE_PROJECT: Add a52dec and libmpcdec 2024-10-17 06:41:40 +01:00
polyesterswing 15a9c63565 AUDIO: Add libopenmpt support 2024-02-21 18:45:25 +01:00
Martin Gerhardy 1827d03ff8 CREATE_PROJECT: use windows subsystem setting for cmake, too
see 335f90b136
2023-12-14 18:00:49 +01:00
Einar Johan Trøan Sømåen f7e7d6e3f5 CREATE_PROJECT: Explicitly add /opt/local/lib to support MacPorts
This should hopefully be fairly harmless for other platforms,
as well as for Homebrew-users. But it doesn't seem like CMake
adds /opt/local/lib to it's linking setup by default.
2023-11-05 22:12:55 +01:00
Einar Johan Trøan Sømåen 37fde9109c CREATE_PROJECT: Explcitly add C++11 support globally
We have C++11 features in use outside engines as well now.
2023-11-05 22:12:55 +01:00
elasota 667cb63823 DEVTOOLS: Add precompiled header support to MSBuild/MSVC. 2023-09-29 21:37:10 +01:00
Donovan Watteau db9f13d475 CREATE_PROJECT: Add libmikmod support 2023-04-10 20:14:22 +02:00
Eugene Sandulenko 741be7bab5 CREATE_PROJECT: Fix warnings 2023-03-30 16:59:49 +02:00
Orgad Shaneh 5214c04718 CREATE_PROJECT: Add required libraries for enet on Windows/CMake 2023-03-16 15:08:08 +01:00
Orgad Shaneh 6fb159f3f3 CREATE_PROJECT: Support Windows specific libraries for features
Use it for tts instead of the current hack.
2023-03-16 15:08:08 +01:00
Orgad Shaneh 45dde26fc5 CREATE_PROJECT: Simplify feature libraries initialization 2023-03-16 15:08:08 +01:00
Eugene Sandulenko 53163f427a DEVTOOLS: Added libvpx support to create_project 2023-03-05 21:29:03 +01:00
Martin Gerhardy ac094c6868 CREATE_PROJECT: only specify those cmake parameters for find_feature, that are really used 2023-01-15 12:02:47 +02:00
elasota 843776dd85 DEVTOOLS: Promote numerous VS warnings to errors.
Changes the following warnings to errors:
C4701: potential use of uninitialized local variable
C4703: potential use of uninitialized local pointer
C4456: declaration hides previous local declaration
C4003: not enough arguments for function-like macro invocation
C4840: use of non-trivial class as an argument to a variadic function
C4805: unsafe mix of bool and int in a numeric operation or comparison
C4305: truncation of double to float or int to bool
C4366: address taken of unaligned field and used as an aligned pointer
C4315: object constructed into an unaligned field with a constructor that expects it to be aligned
2022-12-25 16:31:57 +01:00
Donovan Watteau 700a8071e5 BUILD: Check if there's an fseeko/ftello with 64-bit off_t
Some systems have fseeko but you need to check that off_t is a 64-bit
value (and this requires some magic incantation on some platforms),
others need fseeko64(), Windows has a different symbol, and then some
systems only have an fseek() that's limited to <2GB files.

This is a first step in trying to improve this.
2022-12-11 21:48:33 +01:00
Orgad Shaneh eef62b8b41 CREATE_PROJECT: Fix condition for warning suppression
It should not include e.g. GCC 11.2.
2022-10-27 10:19:17 +03:00
Orgad Shaneh 246a062950 CONFIGURE/CREATE_PROJECT: Silence address-of-packed-member GCC 12 warning
It appears a lot, and these casts are intentional and look safe.

Example:
../scummvm/engines/glk/alan3/actor.cpp: In function 'Glk::Alan3::ScriptEntry* Glk::Alan3::scriptOf(int)':
../scummvm/engines/glk/alan3/lists.h:35:52: warning: converting a packed 'Glk::Alan3::ScriptEntry' pointer (alignment 1) to a 'Glk::Alan3::Aword' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
   35 | #define isEndOfArray(x) implementationOfIsEndOfList((Aword *) (x))
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
../scummvm/engines/glk/alan3/actor.cpp:38:84: note: in expansion of macro 'isEndOfArray'
   38 |                 for (scr = (ScriptEntry *) pointerTo(header->scriptTableAddress); !isEndOfArray(scr); scr++)
      |                                                                                    ^~~~~~~~~~~~
In file included from ../scummvm/engines/glk/alan3/actor.h:25,
                 from ../scummvm/engines/glk/alan3/actor.cpp:22:
../scummvm/engines/glk/alan3/acode.h:453:8: note: defined here
  453 | struct ScriptEntry {    /* SCRIPT TABLE */
      |        ^~~~~~~~~~~
2022-10-27 02:26:02 +03:00
SupSuper 18ebbdcf99 CREATE_PROJECT: Don't add GCC warnings to MSVC CMake 2022-04-25 06:46:28 +01:00
SupSuper d2ad40a7a1 CREATE_PROJECT: Fix missing prefix in CMake engines 2022-04-25 06:28:40 +01:00
Orgad Shaneh 34d3841269 CREATE_PROJECT: Fix cmake project with opengl enabled
Compliments 04b1ce5a6e.
2022-03-07 14:42:52 +02:00
Orgad Shaneh c02abd2967 CREATE_PROJECT: Simplify engines part
Create a function add_engine which handles everything for the engine, and
remove redundant conditions all over the project file.
2022-03-05 21:39:08 +02:00
NMIError 221fa4c841 AUDIO: Add support for RetroWave OPL3
This commit adds support for the SudoMaker RetroWave OPL3 sound card. Requires
the retrowave library.

Add the following settings to scummvm.ini:
retrowaveopl3_bus=serial
retrowaveopl3_port=<port> f.e. COM3 or ttyACM0
2022-01-29 17:33:29 +01:00
Orgad Shaneh 7998025b98 CREATE_PROJECT: Centralize toUpper 2022-01-18 09:24:29 +02:00
Orgad Shaneh aa24872dc6 CREATE_PROJECT: Accept std::ostream in writeFileListToProject 2022-01-14 12:53:21 +02:00
Orgad Shaneh be1e3a011a CREATE_PROJECT: Use range-based for in cmake generator 2022-01-14 08:35:31 +02:00
Orgad Shaneh cf32f6a497 CREATE_PROJECT: Leverage C++11 string literals for cmake generator 2022-01-14 06:02:13 +02:00
Orgad Shaneh f7d528e1b8 DEVTOOLS: Fix link in cmake project with tts enabled 2022-01-12 23:42:41 +02:00
Orgad Shaneh 1d080331a4 DEVTOOLS: Bump minimum cmake version to 3.13
This mutes the following warning:
CMake Warning (dev) at CMakeLists.txt:1581 (target_sources):
  Policy CMP0076 is not set: target_sources() command converts relative paths
  to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  An interface source of target "scummvm" has a relative path.
This warning is for project developers.  Use -Wno-dev to suppress it.
2022-01-12 23:41:38 +02:00
Le Philousophe 52dcac9fc6 CREATE_PROJECT: Fix theoradec feature name
This is needed by sword25
2022-01-09 17:28:17 +01:00
Henrik "Henke37" Andersson 8119ae19c0 CREATE_PROJECT: Fix feature name for freetype
The name was inconsistent with the main build system
2022-01-09 18:27:24 +02:00
Henrik "Henke37" Andersson 61e2c5c928 CREATE_PROJECT: Consistent name for zlib
The feature name didn't match with other code.
2022-01-06 22:43:05 +02:00
Cameron Cawley 21b0d6ded1 BACKENDS: Replace GLEW with GLAD, part of PR #3463 2021-12-30 14:53:48 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 62797daf3c DEVTOOLS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
sluicebox 16bf767de3 CREATE_PROJECT: Add --include-dir and --library-dir
Additional include and library directories can now be added.

This is most useful to Xcode Mac projects where a vanilla Homebrew setup
requires manually adding five directories through the Xcode UI and then
repeating that every time the project needs to be regenerated.

Now create_project can be scripted to regenerate a working Mac project
without any extra Xcode steps.
2021-11-06 19:08:06 -05:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
SupSuper b0bc795999 CREATE_PROJECT: Don't include files with the same name but different paths 2020-11-11 10:24:59 +00:00
sluicebox 4f29b747fd CREATE_PROJECT: Fix compilation on older MSVC 2020-11-10 21:05:51 -08:00
SupSuper e9b3974ff8 CREATE_PROJECT: Replace duplicate filename check with unique object files 2020-11-11 04:12:36 +00:00