Try setting rpath on binary during compile (#10957)

This commit is contained in:
Ted John 2020-03-18 09:39:42 +00:00 committed by GitHub
parent a56a3fb804
commit 091eaf8ba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -171,9 +171,7 @@ jobs:
run: . scripts/setenv -q && get-discord-rpc
- name: Build OpenRCT2
shell: bash
env:
DESTDIR: AppDir
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE=ON
- name: Build AppImage
shell: bash
run: . scripts/setenv -q && build-appimage

View File

@ -33,6 +33,7 @@ set(REPLAYS_SHA1 "3309db1a932709312150124b1e3bbe57c7fb45d0")
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
option(WITH_TESTS "Build tests")
option(PORTABLE "Create a portable build (-rpath=$ORIGIN)" OFF)
option(APPIMAGE "Create an appimage build (-rpath=$ORIGIN/../lib)" OFF)
option(DOWNLOAD_TITLE_SEQUENCES "Download title sequences during installation." ON)
option(DOWNLOAD_OBJECTS "Download objects during installation." ON)
CMAKE_DEPENDENT_OPTION(DOWNLOAD_REPLAYS "Download replays during installation." ON
@ -62,6 +63,10 @@ if (PORTABLE OR WIN32)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif ()
if (APPIMAGE)
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
endif ()
# LIST of supported flags, use SET_CHECK_CXX_FLAGS() to apply to target.
# Use ADD_CHECK_CXX_COMPILER_FLAG() to add to list.
list(APPEND SUPPORTED_CHECK_CXX_COMPILER_FLAGS)