Commit graph

5228 commits

Author SHA1 Message Date
xavi92
cad91d2ead customthirdparty.cmake: Add missing libraries
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9595 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 90f49158d88f4009c7f5d0c79cfae7fb643a8cde
Former-commit-id: b01685f84ecbe3c9e1d657d156b1cb023e1eb947
2024-10-27 08:01:58 +00:00
xavi92
221a933702 Define xmlversion as ExternalProject
xmlversion is meant to be a build-time tool, which means it must never
be cross-compiled. Since toolchain settings are shared among all
libraries within a project, the only way in CMake to build an executable
using the host toolchain (instead of the cross-toolchain) is to define
it inside of an ExternalProject.

xmlversion also depends on several in-house libraries that must be also
build with the host toolchain, so those libraries shall be both
cross-compiled and natively compiled.

On the other hand, since a known install prefix is assigned to
xmlversion, _XMLVER_EXE, _XMLVER_DIR and _XMLVER_NAME no longer need to
be calculated.

Note that CMAKE_FIND_ROOT_PATH must not be passed to the ExternalProject
since xmlversion must never be cross-compiled.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9594 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d3332d5a3d388b6a6f0179b72e509606ec0055aa
Former-commit-id: 31997c4074f9e9395cb1ccfd9f7487e02584eaf4
2024-10-27 08:01:23 +00:00
xavi92
a90eae53b3 FindSDL2.cmake: Do not require mingw32 library
This library is not defined by the x86_64-w64-mingw32 toolchain, and it
is not required by the project, either.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9593 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5718cd2dbc3fc0d79246c65e65fae91b4f530bb7
Former-commit-id: 982e5f5388d65fce31ec9928d53a2976c75f5cae
2024-10-27 08:00:54 +00:00
xavi92
84f03be13d cmake: Set INTERFACE_* properties
Otherwise, target_link_libraries would be unable to find the library
path when using a target name e.g.: rhash::rhash.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9592 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ac76245db02518aa3d922d3655827259bbabfa54
Former-commit-id: 0b2d4fddd88c70ed19861d3e2d53bce395e92947
2024-10-27 08:00:07 +00:00
xavi92
2cd6611844 internaldeps.cmake: Deprecate legacy macros
ADD_INTERFACE_INCLUDEDIR relied on legacy CMake macros such as
INCLUDE_DIRECTORIES. Nowadays, targets do not specify their
dependencies' include directories, but just call target_link_libraries
so that CMake takes care of the rest.

Of course, that requires every target to define their own include
directories, if any, via target_include_directories.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9591 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f1d7ea3cb16eb1a23d600b219da8c64502e10c00
Former-commit-id: f5f7e5f86e3e984e60f794115da53fb97f7a9b22
2024-10-27 07:59:26 +00:00
xavi92
5798b9b850 macros.cmake: Simplify definition for SOURCE_DIR
The intention behind this overly complicated code was to find the
path to the top-level directory, which can be easily achieved via
CMAKE_SOURCE_DIR.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9590 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c760749883682a7879fc8cf1b5ab36719d1bab97
Former-commit-id: 0f212d66bfb33d92f4270fba3d3e2122e67f6c25
2024-10-27 07:58:46 +00:00
xavi92
f409ebdecc FindSDL2.cmake: Add CMAKE_FIND_ROOT_PATH to PATHS
Otherwise, builds that do not rely on standard search paths (e.g.:
Windows builds using a relative 3rdParty/ directory) would not be able
to find SDL2 libraries or header files.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9589 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: b9ebe31b7b7de7dad0c7e3dc903e7acb893a3883
Former-commit-id: 09665c149ad79678cb3ac11bc5ed79ed9aea0cdb
2024-10-27 07:58:17 +00:00
xavi92
21807b8820 cmake: Remove SD_FIND_CUSTOM_3RDPARTY
This macro, along with _FIND_3RDPARTY_DEPENDENCY and
_FIND_3RDPARTY_DEPENDENCIES, was meant to tell find_package() and
friends about non-standard paths to find libraries when building for
Windows.

However, the same effect can be achieved via the standard CMake
variables CMAKE_PREFIX_PATH [1] and CMAKE_FIND_ROOT_PATH [2].

If cross-compiling, CMAKE_FIND_ROOT_PATH must be assigned when
configuring the project. This means the project must now be configured
with:

cmake -B <build-dir> -DCMAKE_FIND_ROOT_PATH=<root-dir>/3rdParty ...

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
[2]: https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH.html


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9588 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 9a28c7ff755e57080c1f6075dc9b7585146681b9
Former-commit-id: b406ba92a1955da3523eff392606d04d752bfdd0
2024-10-27 07:57:27 +00:00
xavi92
53f11523b6 3rdParty-devel: Add cJSON/LICENSE
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9587 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7b09c4fd9dc5296cadb9f712884805c33e999c66
Former-commit-id: 842ddc4518d59a7c8089d2d7b3544ed1ae423fe9
2024-10-27 07:56:57 +00:00
xavi92
05f45ee35a 3rdParty-devel: Upgrade to minizip-1.3.1
According to Repology [1], zlib-1.3 is affected by CVE-2023-45853 [2].

[1]: https://repology.org/project/zlib/cves?version=1.3
[2]: https://nvd.nist.gov/vuln/detail/CVE-2023-45853


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9586 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f3c09590b0a6838d0478d5f05732dab0d09615a7
Former-commit-id: e2bdf1831a8b48bf7846526af2cfad73f781d79c
2024-10-27 07:56:24 +00:00
xavi92
95782a8ff4 3rdParty-devel: Set OPENTHREADS_ATOMIC_USE_MUTEX=ON
Otherwise, OpenSceneGraph would fail to configure with:

-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE (advanced)
_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE__TRYRUN_OUTPUT (advanced)
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED_EXITCODE (advanced)
_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED_EXITCODE__TRYRUN_OUTPUT (advanced)
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed

Note: in the case of the x86_64-w64-mingw32 cross-toolchain, this
commit requires the win32 thread model.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9585 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: abf7682212a38ea7a333eff88ed0743fef66da47
Former-commit-id: fb021387b5f54830fb7a6b93e3794e05d10de7de
2024-10-27 07:55:38 +00:00
xavi92
4e3e21fc01 3rdParty-devel: Patch .def files for vorbis
Even if the library name on the "LIBRARY" directive from a .def
file is defined as optional according to the specification [1],
MinGW requires it anyway. Otherwise, the linker would throw the
following error message:

.def: file format not recognized; treating as linker script

Even if this had been already reported as an issue many years ago [2],
it can still be reproduced on x86_64-w64-mingw32-ld-win32 2.43.

[1]: http://msdn2.microsoft.com/en-us/library/30fw19zw
[2]: https://lists.gnu.org/archive/html/bug-binutils/2006-03/msg00147.html


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9584 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5dd3ccdc7d18670008698ea22820d357c7ec362c
Former-commit-id: 4647af42a658582de0c01115ec9a345af43300b5
2024-10-27 07:55:04 +00:00
xavi92
fcc3ce9428 3rdParty-devel: Import vorbis files to patch
Future commits shall patch these files to fix some build-time issues in
Windows. Since CMake lacks a PATCH command as of the time of this
writing, files must be copied entirely.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9583 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: eb5fe306634342de935a1a5317da8e843d918296
Former-commit-id: 7ad29f1ce76b5ccddd6ac8ad9b239ea2e01fcec9
2024-10-27 07:54:30 +00:00
xavi92
2004f4ba0c cmake: Rely on CURL::libcurl instead of CURL_LIBRARY
When calling find_package(CURL), different files might be inspected:

- $CMAKE_PREFIX/Modules/FindCURL.cmake
- 3rdParty/lib/cmake/CURL/CURLConfig.cmake

Which file is selected is decided by CMake depending on the context.
Unfortunately, whereas the former defines CURL_LIBRARY, the latter
does not.

However, both define the CURL::libcurl target, from which the library
location can be retrieved with get_property() so as to achieve the
same effect.

Fixing this also makes CURL_NO_CURL_CMAKE redundant.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9582 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 470e785d15589e41bf6f5d1b3c42318bb5ef645e
Former-commit-id: 5f8c279fc814833acdb26ade8979f67950033a8b
2024-10-27 07:54:00 +00:00
xavi92
060bdf2a24 3rdParty-devel: Patch OpenSceneGraph-3.6.5
There were several errors when building OpenSceneGraph for Windows:

- using namespace std caused ambiguity with some symbols, and
DisplaySettings.cpp was already prepending std:: to all standard
symbols.
- ChangeDisplaySettingsEx returns a LONG [1], so casting to unsigned int
causes loss of precisions in some platforms.

[1]: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-changedisplaysettingsexa


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9581 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 8991aeb238dfe0539be4a73e65ce8e2ed2bfe1ee
Former-commit-id: ebe17105114bd97afe72520289ffd08fe5acfcae
2024-10-27 07:53:27 +00:00
xavi92
bdc55d6494 3rdParty-devel: Import OpenSceneGraph files to patch
Future commits shall patch these files to fix some build-time issues in
Windows. Since CMake lacks a PATCH command as of the time of this
writing, files must be copied entirely.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9580 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d2542a7c4caffa37bc57550ba60ffab3bb0d383e
Former-commit-id: d8aaf4bbfd6017780ba1d3ffce8e600c388ea505
2024-10-27 07:52:37 +00:00
xavi92
078066c053 3rdParty-devel: Patch plib
There are several errors when building plib for Windows:

- Casting a pointer to DWORD is unsafe because they might have different
sizes. DWORD_PTR [1] must be used instead.
- Casting a pointer to long is unsafe because they might have different
sizes. ptrdiff_t must be used for pointer arithmetic.
- slDSP::counter is private so it cannot be used by waveOutProc. A
public function is now defined to achieve the expected behaviour.

[1]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/66d61dd8-2191-4a37-b963-e49bf0dc2579


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9579 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d284052bb28c49e40714a36cdc135aa284a524fa
Former-commit-id: a5f73738a1f8f9a1687c5e071f20c99b0e83a4dd
2024-10-27 07:52:04 +00:00
xavi92
a99733cbed 3rdParty-devel: Import plib files to patch
Future commits shall patch these files to fix some build-time issues in
Windows. Since, as of the time of this writing, CMake lacks a PATCH
command, files must be copied entirely.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9578 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ae23404d634e4146147f01f3d3d5faafccdea77e
Former-commit-id: bcde47f4b24ff356f32ebd222393bf731bed6ad8
2024-10-27 07:51:29 +00:00
xavi92
a8d1009656 3rdParty-devel: Remove sd_libpng_rename
These are in fact not required.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9577 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 32c552e368a378bb72549a9f2645926e2b69dedb
Former-commit-id: 31422c76cbbabd7ffef11d72979095274480262d
2024-10-27 07:50:46 +00:00
xavi92
550a36bad3 3rdParty-devel: Remove zlib steps
These are in fact not required.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9576 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: cf8c5bb154f76101dde4f94409bf480a7f0c886e
Former-commit-id: d08fb72e92fcefeb9820d177f4afd03a65510ba0
2024-10-27 07:50:17 +00:00
xavi92
4f8e2aaf09 3rdParty-devel/CMakeLists.txt: Avoid cJSON test programs
This should make the build simpler and less prone to build-time errors.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9575 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c31b6a45de6bebb1f87038142cae3ecde9ad964a
Former-commit-id: 6c358e0f95f15a1d39b5aaace5817566cd651f58
2024-10-27 07:49:14 +00:00
xavi92
197f34c78d 3rdParty-devel/CMakeLists.txt: Do not make cJSON depend on zlib
cJSON simply does not depend on zlib, so there is no need to add the
build-time dependency.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9574 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 739aed907cb9276f8ae996375df0c5dd097956f0
Former-commit-id: 33073862552c3a1f17b319c831cc45af1bf5339d
2024-10-27 07:48:29 +00:00
xavi92
3663ac317a 3rdParty-devel/CMakeLists.txt: Do not build TinyGLTF by default
This library is still not used by the project.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9573 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 58ed948f463edb3ccd75a443515f7fdef606e64c
Former-commit-id: 4ce9d326149365f0211d30baf4a432dfc87fb30e
2024-10-27 07:48:05 +00:00
xavi92
720f36e145 3rdParty-devel: Always set BUILD_SHARED_LIBS
The Windows build of the project completely relies on shared libraries
and makes no use of static libraries.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9572 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3dd03a4f89a09978179f9996c428e9917ee0b930
Former-commit-id: caad9de0102ec4e68692c80ce6e2ac8becb876e0
2024-10-27 07:47:32 +00:00
xavi92
e6be91940d 3rdParty-devel/CMakeLists.txt: Set CMAKE_FIND_ROOT_PATH
This standard CMake variable allows CMake to find dependencies on
non-standard directories, such as ${EXTERNALS_INSTALL_DIR}.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9571 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: acacfb8605838769657058188fd5adfad2dc71af
Former-commit-id: 4a7917b408d3e109fe3627875d49c2bd0bc28326
2024-10-27 07:46:50 +00:00
xavi92
410222311e 3rdParty-devel/CMakeLists.txt: Use CMake for rhash
Upstream rhash relies on a configure script, which is not portable to
non-POSIX platforms such as Windows.

Note: CMake support in rhash is only experimental [1] and currently
relies on in-house patches introduced by previous commits.

[1]: https://github.com/rhash/RHash/pull/103


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9570 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f0888f552555ee6338877097ad5d98f2903886be
Former-commit-id: 0ff2548c35a6e833d74873cf8f34ab7fb61ff9fb
2024-10-27 07:46:09 +00:00
xavi92
e31ceadeb0 3rdParty-devel: Introduce rhash-tohex.cmake
Upstream rhash requires to define RHASH_XVERSION as:

printf "0x%02x%02x%02x%02x" major minor patch 0

However, the CMakeLists.txt introduced by the experimental branch [1]
did not include this definition.

Since calculating this string requires complex string manipulation in
CMake, a new file, namely rhash-tohex.cmake, and a function with the
same name have been introduced.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9569 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f4600f8fdd048d6638cfb600443c7c15e87cbc5e
Former-commit-id: 42557b46093e35d032de3d3aa7cf190ab5da3e9b
2024-10-27 07:45:42 +00:00
xavi92
d84bbd1140 librhash/CMakeLists.txt: Update sources/headers lists
The experimental branch that introduced this CMakeLists.txt [1] is
probably outdated and does not reflect the current tree structure.

Note that test_lib.{c,h} and test_utils.{c,h} have been intentionally
left out since they are not meant to be part of the rhash library.

[1]: https://github.com/rhash/RHash/pull/103


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9568 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 81dfe170c24d4e7b4d7311835a30538fd741b8ab
Former-commit-id: 7deddae1e14c1037161844a4459b6b1c08ff5e8b
2024-10-27 07:44:59 +00:00
xavi92
cc6fbaa67f Import rhash experimental CMakeLists.txt
CMake support is only available from an experimental branch [1].

Future commits shall replace the rhash build defined on
3rdParty-devel/CMakeLists.txt so as to use CMake over the ad-hoc
configure script defined by upstream rhash.

The reason behind the change is to allow non-POSIX platforms (e.g.:
Windows) to configure the rhash project using CMake.

[1]: https://github.com/rhash/RHash/pull/103


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9567 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d1264aa8d64953b9781cb6cf7c49f44cb5e95e2b
Former-commit-id: 431dea44caad0e54e68de9012fcb662965018b3f
2024-10-27 07:44:18 +00:00
xavi92
61b16fe97c Add x86_64-w64-mingw32.cmake
This file is meant to be used as a CMAKE_TOOLCHAIN_FILE [1] when
building the 3rdParty-devel project.

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_TOOLCHAIN_FILE.html


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9566 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d741bd0dea7310810e846437b2c7c9f2c63dcf7a
Former-commit-id: c7634eabd04a5c78eee324278fa3d9a5f76b09e6
2024-10-27 07:43:43 +00:00
xavi92
999885b529 3rdParty-devel/CMakeLists.txt: Support CMAKE_TOOLCHAIN_FILE
This standard CMake variable allows to cross-build the project using a
so-called "toolchain file", which defines the cross-toolchain.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9565 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c32ded0530faff50bb0266f994443ff9113714cc
Former-commit-id: 9309b1bb7568f2ba0c368e8550de01e941fdab74
2024-10-27 07:42:54 +00:00
xavi92
4beaf17b44 3rdParty-devel: Limit warnings to Visual Studio
These warnings are not relevant for other CMake generators, such as
"Unix Makefiles".


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9564 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c55b1096df21d5ea77037c61ef967865bc6878d4
Former-commit-id: 7c5a6de53b4fddf313acf7dd693c299f5b5c79c3
2024-10-27 07:42:19 +00:00
xavi92
c85eddfd1f thirdpartydefinitions.cmake: Fix typo
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9563 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 921ca762dd097e05e2c9c1e00ccc8a1d929b539a
Former-commit-id: ebbc040007e1543c09a462d9fc65257aba393315
2024-10-27 07:41:42 +00:00
xavi92
2fea662e8a 3rdParty-devel: Simplify endif() and else()
Repeating the condition statement on endif() and else() is a legacy
CMake feature [1].

[1]: https://cmake.org/cmake/help/latest/command/if.html


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9562 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5ca54458cfe85c29a6739a2626c9569ce222b08d
Former-commit-id: 62b86d1e50db7ad4f2c6820cec017f059c79baad
2024-10-27 07:41:13 +00:00
xavi92
7d34dd5f70 networking: Fix invalid case for winmm
Windows systems are case-insensitive. However, POSIX systems could fail
to find libwinmm.a, as distributed by the x86_64-w64-mingw32
cross-toolchain.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9561 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ee33f425318e003be21d72f64daa3e6726607da0
Former-commit-id: 1b02cc82dc6ddfe2670a31c274d40fc3ac1a115f
2024-10-27 07:39:32 +00:00
xavi92
ae54f23f05 FindPLIB.cmake: Add ssgAux as name hint
Whereas Windows systems are case-insensitive, POSIX systems could fail
to find libssgAux accordingly.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9560 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ecfbe7fddc04996fa305c4411089f98a7c2fc67e
Former-commit-id: d7ef6b509885f1a216f5c41ae708ad2c35ba5a64
2024-10-27 07:39:00 +00:00
xavi92
d5bff2ab4b tgf.cpp: Include config.h on WIN32
For some unknown reason, HAVE_CONFIG_H is left undefined for Windows.
However, tgf.cpp has some references to SD_BUILD_INFO_SYSTEM and other
macros provided by config.h.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9559 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a1c202a30f9760495dc3850f37769595a8d95d4d
Former-commit-id: 0183873c095831cb15adcaf9922a6843ca1f4c81
2024-10-27 07:38:34 +00:00
xavi92
1c47007aee raceinit.cpp: Add missing #include
This source file depends on VERSION_LONG, which is defined by config.h.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9558 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 97290e42ecae6346c00ca6771368fb9a266ad5c5
Former-commit-id: a2ba63b918f8c04a032b87726b1d4bf143da6741
2024-10-27 07:37:55 +00:00
xavi92
7ddb924550 main.cpp: Define SDL_MAIN_HANDLED
According to the documentation [1], SDL.h defines `main` as a macro
so as to perform automatic initialization and replaces the main
function with `SDL_main`. In order to avoid this behaviour, the
SDL_MAIN_HANDLED macro must be defined before including SDL.h.

This commit solves link-time undefined references to `main`.

[1]: https://wiki.libsdl.org/SDL2/SDL_SetMainReady


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9557 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: dc524d945dab929872060470a1073de283064883
Former-commit-id: e316320adb8e8697167f281a79968fd65af23327
2024-10-27 07:37:01 +00:00
xavi92
121d1f14b6 grloadac.cpp: Do not render windows in interior view
This commit forces OpenGL to cull the windows when loading the model, so
that single-sided windows are not rendered in interior view.

Cherry-picked from:

- https://sourceforge.net/p/cars-sports-racing/code/303/
- https://sourceforge.net/p/cars-sports-racing/code/308/


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9556 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: bd67efd9ec4a2a7b65b32799e1c24fb1f3dee02d
Former-commit-id: d43554e9fa2a7a66d0c5765a108cb4c6e7b96d6f
2024-10-06 11:43:25 +00:00
xavi92
8eb0ec30e9 Remove $Id leftovers
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9555 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 54c37996aa3713c058f7268afc652eba92a84a59
Former-commit-id: 99341655706664ea7122d6e28370c8b63a095b29
2024-10-06 06:21:25 +00:00
xavi92
4681971d6d Remove svn:keywords property from the repository
These properties are not transmitted with git-svn(1) [1], which might
then cause failed patches when modifying lines close to these
properties.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9554 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6ed21e1fe12d01a370842418c35722c75117a30a
Former-commit-id: 8ecd21b7c0211cd000b10b3f0032980f63c06398
2024-10-02 15:30:18 +00:00
xavi92
3ee635abb7 raceinit.cpp: Remove svn:keywords property
This is a preliminary test to ensure SVN's $Id$ keyword [1] is not
transmitted when using git-svn(1) [2].

[1]: https://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.keywords.html
[2]: https://git-scm.com/docs/git-svn


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9553 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 531c15d57fbce1ccd78af6da7ced8530a990f09a
Former-commit-id: 8a396f5a4dcd8b8e1a5231ad3d08679c3aefd8d1
2024-09-30 06:06:54 +00:00
xavi92
014f82c37c Fix trailing whitespaces and ending newlines
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9552 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f126eada2ef5b97c10fbb59d74901bcc03303a19
Former-commit-id: df90a174acb9bc1810f0f24cfc186ff2bc36d420
2024-09-30 05:23:49 +00:00
xavi92
db0044baf9 Fix wrongly encoded character
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9551 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c52fd8dae18367fe4aa5c96454ae03130d12c6b8
Former-commit-id: 80afb101f35c4b34bcd805f8a84d6c4007b3451b
2024-09-30 05:23:22 +00:00
xavi92
0e7a45d2be Remove $Id$
This SVN-specific keyword [1] did not expand as expected on Git
repositories migrated from SVN via git-svn(1) [2]. Because of this,
applying patches with modifications would sometimes fail because, even
if these lines were not modified, they could be part of the context
lines, thus heavily confusing Git.

Since it is already expected to migrate from SVN to Git sometime soon,
this would also make $Id$ redundant.

[1]: https://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.keywords.html
[2]: https://git-scm.com/docs/git-svn


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9550 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7acf9a9675a0496a85ecd61210b8c29c89f9517a
Former-commit-id: 1878bb38889e4dddc83ef762b6b384f0f0a4ecc5
2024-09-30 05:17:15 +00:00
xavi92
944b41e856 raceselectmenu.cpp: Release RmRaceSelectMenuHandle on exit
Reusing the same handle even when the menu exits introduced a bug when a
pointer to &rmRaceTypes.back() was used by rmOnSelectRaceMan, causing
undefined behaviour when rmRaceTypes was cleared by
rmOnRaceSelectShutdown.

Forcing RmRaceSelectInit to always initialise RmRaceSelectMenuHandle
fixes this because rmRaceTypes is now always initialised.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9549 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6c0e86dab9a38df6e4c6fa1308bf1cbd517f743f
Former-commit-id: 059275634d4548949c15bdd54d25957e738ad754
2024-09-16 17:46:39 +00:00
xavi92
b0b9d370df raceselectmenu.cpp: Use tabs consistently
This file was mostly using tabs, but some lines were inconsistently
indented with spaces.



git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9548 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f08173cbe33aadcf1504b2b08adfdce82fcd6e64
Former-commit-id: 12006834fff008ab6ec9f64289eb479de4b26555
2024-09-16 17:46:11 +00:00
xavi92
040d7e2d7e Avoid dangerous casts between integers and pointers
It is not portable to cast from/to void * to/from long without losing
precision.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9547 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 32f65435834d8eb531afd6332c65660d93b6d7b5
Former-commit-id: 4e0c836a31dc1b36b317ea684409f81f445a3160
2024-08-25 22:12:37 +00:00
xavi92
0b578b3d17 win32/rand.cpp: Use valid format specifier
According to the specification [1], DWORD is always defined as an
unsigned long.

[1]: https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9546 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5ecc10653e325f77962fa6b9df536474c82cd667
Former-commit-id: 3b414f499b36f49a2a62b6c1a969645e5c2a4d28
2024-08-25 22:11:45 +00:00