The existing scripts for Debian and NSIS packaging were too complex and
dealt unnecessarily with lower level details that should be already
handled by CMake and CPack.
- Packaging-related scripts have been moved to the new cpack/ directory.
There, CPack variables common to all generators are defined in
cpack/common.cmake, and then generator-specific variables are defined
independently (e.g.: cpack/debian.cmake and cpack/nsis.cmake).
- Packaging is now optionally done at a second stage, by running
`cpack -G <generator>` on the build directory. This removes the
requirement to branch based on the system name, and instead all CPack
variables are assigned unconditionally.
- Since now only one version of the game is packaged, there is no need
to maintain the complex scripts in packaging/ and packaging/windows that
used to deal with all variants (e.g.: "wip-cars-and-tracks",
"hq-cars-and-tracks", etc.).
- The use of CPACK_NSIS_EXTRA_INSTALL_COMMANDS,
CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS and CPACK_NSIS_CREATE_ICONS_EXTRA
should not be required, let alone modifying the HKLM registry manually,
since CPack already provides everything required to set up the
installer, the uninstaller and shortcuts.
- $INSTDIR is not required, since NSIS would already prepend the
target installation directory.
- PROJECT_VERSION_METADATA is not a standard CMake variable.
CMAKE_PROJECT_VERSION_TWEAK is instead meant for this purpose. [1]
- OPTION_PACKAGING and OPTION_ALL_IN_ONE_PACKAGING were removed since
packaging will always be available, yet optional. Packagers must then
run CPack on a second stage, as described above.
- Outdated comments were removed to avoid confusion.
TODO:
- Add shortcut to track editor on NSIS.
- dmg packaging was not revamped because of lacking compatible
hardware, but still it has been moved to cpack/dmg.cmake.
- Windows portable packaging (OPTION_PORTABLE_PACKAGING) has been left
out since it required 7z and relied on several hacks to work.
Furthermore, portable versions of the game were already not released on
the latest release, either. [2]
[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_VERSION_TWEAK.html
[2]: https://sourceforge.net/projects/speed-dreams/files/2.3.0/
CMake discourages the use of configure_file() to generate files such as
cJSONConfig.cmake because it might expand variables such as
<project>_INCLUDE_DIR to absolute paths, which might cause issues on
Windows and macOS [1].
Instead, configure_package_config_file() is meant as a drop-in
replacement that generates cJSONConfig.cmake using relative paths. In
the context of this project, this should allow pre-compiled versions of
the `3rdParty` directory to be shared among developers.
[1]: https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9610 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: dc7f18be6bfa6f933909544176af600c48755173
Former-commit-id: 93228e7d1f46efa51dd919c3ce20e4b735c58726
This call to set_target_properties would typically remove the "lib"
prefix from the library name for no reason, causing some systems to not
be able to find it when calling find_package().
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9608 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 542ac1c48c1764c5af5bd7f0901d05add1554e66
Former-commit-id: 654e67eaae7a5386af726da3b9457797a41c2cb1
MinGW already distributes OpenGL headers and libraries under different
directories. In such cases, it is more sensible to rely on those than
the in-tree copies maintained by the project.
Note that, for some unknown reason, the include directories for the
OpenGL::GL target are not filled, even if find_package(OpenGL) is
successful and the library is found. Therefore, this commit works around
this limitation by finding GL/gl.h from a possible list of directories
inside the toolchain.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9606 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: f663966c6bd42cfcb2b5135b871bb2e2e1636994
Former-commit-id: 92e313ea0f1edc8e030021225dec2c347b69f86f
These libraries are defined by the FreeSOLID project and required by
the speed-dreams-2 executable. However, for some unknown reason,
upstream does not install() them, so it must be patched.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9600 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: d40c860e1a5494c4e23022c1ce7d22b86ecd3455
Former-commit-id: 771b4a9d1612100acad3a9756553b922f7bb351e
Future commits will patch these files so as to fix issues with
FreeSOLID's upstream build system.
These files have been copied from the 2.1.2 release.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9599 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 9b06806b32131c5e41f1103dfa711e721039968f
Former-commit-id: b995698ff9c7f23f557574a6d2421dacd08d10c0
Assigning this variable to "" causes some library names to contain the
double quotes e.g.: broad"".dll.
This fixes a build error from [MSBuild]::NormalizePath when using MSVC
as the C++ toolchain.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9597 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 7f5d1b427e0a0d4552f800b52d0777f54e3f5083
Former-commit-id: bad20fd8bffd6daf4574562d9d7d729485202cec
There is no need to remove the assignment to CMAKE_DEBUG_POSTFIX on the
CMakeLists.txt since it is explicitly assigned by the call to
ExternalProject_Add.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9596 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 855063d1ca32df00e103675b1879ff4530340620
Former-commit-id: bcdc3f8798d8d69a33afc963754555948fec24f0
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
This is a 0-clause BSD-licensed, tiny hash library written in C and
widely available on both POSIX and Windows systems.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9539 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 2bdfd5a8b16647266a18c55e870b0013e948d08d
Former-commit-id: d56649b829919db5d7bd0774f25560ffd822185c