Skip to content

Commit e18e9fd

Browse files
mariotaku7coil
authored andcommitted
LG WebOS: RPATH fix
1 parent ef0910b commit e18e9fd

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed

CMakeLists.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,17 @@ if(OPTION_PACKAGE_DEPENDENCIES)
222222
message(FATAL_ERROR "OPTION_PACKAGE_DEPENDENCIES can only work with CMake 3.16+; you are using ${CMAKE_VERSION}")
223223
endif()
224224

225-
if (NOT WEBOS)
226-
# If we are packaging dependencies, we do two things:
227-
# 1) set the RPATH to include $ORIGIN/lib; $ORIGIN (that literal string)
228-
# is a Linux indicator for "path where application is". In CMake, we
229-
# have to do this before add_executable() is executed.
230-
# 2) copy the libraries that we compile against to the "lib" folder.
231-
# This is done in InstallAndPackage.cmake.
232-
set(CMAKE_INSTALL_RPATH "\$ORIGIN/lib")
233-
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
234-
endif()
225+
# If we are packaging dependencies, we do two things:
226+
# 1) set the RPATH to include $ORIGIN/lib; $ORIGIN (that literal string)
227+
# is a Linux indicator for "path where application is". In CMake, we
228+
# have to do this before add_executable() is executed.
229+
# 2) copy the libraries that we compile against to the "lib" folder.
230+
# This is done in InstallAndPackage.cmake.
231+
set(CMAKE_INSTALL_RPATH "\$ORIGIN/lib")
232+
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
233+
if (WEBOS)
234+
set(CMAKE_INSTALL_RPATH "\$ORIGIN")
235+
endif ()
235236
endif()
236237

237238
include(CTest)

os/webos/package.sh

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,12 @@ cp -r ../../build/openttd dist/openttd
1212
cp -r public/. dist/
1313

1414
mkdir dist/lib
15-
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libicudata.so.70.1 dist/lib
16-
ln -rs dist/lib/libicudata.so.70.1 dist/lib/libicudata.so.70
17-
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libicui18n.so.70.1 dist/lib
18-
ln -rs dist/lib/libicui18n.so.70.1 dist/lib/libicui18n.so.70
19-
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libicuuc.so.70.1 dist/lib
20-
ln -rs dist/lib/libicuuc.so.70.1 dist/lib/libicuuc.so.70
21-
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libstdc++.so.6.0.30 dist/lib
22-
ln -rs dist/lib/libstdc++.so.6.0.30 dist/lib/libstdc++.so.6
23-
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libfluidsynth.so.3.3.3 dist/lib
24-
ln -rs dist/lib/libfluidsynth.so.3.3.3 dist/lib/libfluidsynth.so.3
25-
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libreadline.so.8.1 dist/lib
26-
ln -rs dist/lib/libreadline.so.8.1 dist/lib/libreadline.so.8
27-
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/lib/libatomic.so.1.2.0 dist/lib
28-
ln -rs dist/lib/libatomic.so.1.2.0 dist/lib/libatomic.so.1
15+
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libicudata.so.70.1 dist/libicudata.so.70
16+
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libicui18n.so.70.1 dist/libicui18n.so.70
17+
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libicuuc.so.70.1 dist/libicuuc.so.70
18+
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libstdc++.so.6.0.30 dist/libstdc++.so.6
19+
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libfluidsynth.so.3.3.3 dist/libfluidsynth.so.3
20+
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/usr/lib/libreadline.so.8.1 dist/libreadline.so.8
21+
cp $TOOLCHAIN_DIRECTORY/arm-webos-linux-gnueabi/sysroot/lib/libatomic.so.1.2.0 dist/libatomic.so.1
2922

3023
ares-package dist/

0 commit comments

Comments
 (0)