DolphinQt: Set the executable's rpath to a lib directory in $ORIGIN on Steam builds for Linux

We will store our Qt shared libraries here.
This commit is contained in:
OatmealDome 2022-02-20 03:09:53 -05:00
parent e679502a5d
commit 6b05f5cca8

View File

@ -606,6 +606,22 @@ else()
install(TARGETS dolphin-emu RUNTIME DESTINATION ${bindir})
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND STEAM)
# Set that we want ORIGIN in FLAGS.
# We also want RPATH, not RUNPATH, so disable the new tags.
target_link_options(dolphin-emu
PRIVATE
LINKER:-z,origin
LINKER:--disable-new-dtags
)
# For Steam Runtime builds, our Qt shared libraries will be in a "lib" folder.
set_target_properties(dolphin-emu PROPERTIES
BUILD_WITH_INSTALL_RPATH true
INSTALL_RPATH "\$ORIGIN/lib"
)
endif()
if(USE_MGBA)
target_sources(dolphin-emu PRIVATE
GBAHost.cpp