From 091eaf8ba2dded715e06e5004a0f78938d5e1e62 Mon Sep 17 00:00:00 2001 From: Ted John Date: Wed, 18 Mar 2020 09:39:42 +0000 Subject: [PATCH] Try setting rpath on binary during compile (#10957) --- .github/workflows/ci.yml | 4 +--- CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f544d589f7..150bfb1763 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index ce4ec60e78..3a356dce99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)