diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-05 12:31:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 12:31:27 +0100 |
commit | 05df7996a4c8039db0785a7e22fe8db59bcc7513 (patch) | |
tree | cfdcacee3984fc32148f83d7385e3422acfba69a /cmake/Options.cmake | |
parent | a4035af3375825ae277f1363c5d814ee55b92d7c (diff) | |
download | openttd-05df7996a4c8039db0785a7e22fe8db59bcc7513.tar.xz |
Feature: [Actions / CMake] support for generic linux builds (#8641)
These bundles can be opened on any "modern" Linux machine with
a driver that SDL2 supports.
Machines needs at least glibc 2.15, which was released 10 years ago.
It is build with CentOS 7 as base, and only assumes the following
libraries are available on the system:
- libc
- libdl
- libgcc_s
- libpthread
- librt
- libstdc++
All other libraries the game depends on are bundled together with
the game, so users don't need any library installed to use this
bundle. The downside of course is that this increases the binary
size a bit: 30 MiB of libraries are in this bundle.
RPATH is used to make ld-linux find the folder libraries are
stored in; however, system libraries are always used before these,
in the assumption libraries on the user system are more up-to-date.
Using -DOPTION_PACKAGE_DEPENDENCIES=ON switches on packaging
of libraries in the "lib" folder. This requires CMake 3.16 to
be installed; otherwise it will fail.
Diffstat (limited to 'cmake/Options.cmake')
-rw-r--r-- | cmake/Options.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/Options.cmake b/cmake/Options.cmake index c94a193b3..42d112790 100644 --- a/cmake/Options.cmake +++ b/cmake/Options.cmake @@ -44,7 +44,9 @@ endfunction() # set_options() # function(set_options) - if(UNIX AND NOT APPLE) + option(OPTION_PACKAGE_DEPENDENCIES "Copy dependencies into lib/ for easy packaging (Linux only)" OFF) + + if(UNIX AND NOT APPLE AND NOT OPTION_PACKAGE_DEPENDENCIES) set(DEFAULT_OPTION_INSTALL_FHS ON) else() set(DEFAULT_OPTION_INSTALL_FHS OFF) @@ -76,6 +78,7 @@ endfunction() # show_options() # function(show_options) + message(STATUS "Option Package Dependencies - ${OPTION_PACKAGE_DEPENDENCIES}") message(STATUS "Option Dedicated - ${OPTION_DEDICATED}") message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}") message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}") |