From 2bc2047770d5ae2849bf2166eae0edd1049e4e18 Mon Sep 17 00:00:00 2001 From: Johannes Obermayr Date: Sat, 30 Aug 2014 23:36:29 +0200 Subject: [PATCH] cmake: Fix RPATH/RUNPATH issue with openSuse wxWidgets libdir. Gregory: Add an if clause to only change the rpath on openSuse For me it doesn't follow the FHS => http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/fhs.html --- cmake/Pcsx2Utils.cmake | 3 +++ pcsx2/CMakeLists.txt | 6 ++++++ plugins/spu2-x/src/CMakeLists.txt | 6 ++++++ plugins/zzogl-pg/opengl/CMakeLists.txt | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake index 6a607ed4f9..f38816b1c2 100644 --- a/cmake/Pcsx2Utils.cmake +++ b/cmake/Pcsx2Utils.cmake @@ -23,6 +23,9 @@ function(detectOperatingSystem) if ("${OS_RELEASE}" MATCHES "^.*ID=fedora.*$") set(Fedora TRUE PARENT_SCOPE) endif() + if ("${OS_RELEASE}" MATCHES "^.*ID=.*suse.*$") + set(OpenSuse TRUE PARENT_SCOPE) + endif() endif() endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index fa5bd9199f..7e0f3fe946 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -1,3 +1,9 @@ +if (OpenSuse) + # OpenSuse don't install wx in a standard library system + # path. Let's bypass the dynamic linker and hardcode the path. + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON) +endif() + # Check that people use the good file if(NOT TOP_CMAKE_WAS_SOURCED) message(FATAL_ERROR " diff --git a/plugins/spu2-x/src/CMakeLists.txt b/plugins/spu2-x/src/CMakeLists.txt index 9a6088ddf4..ffdc37c95e 100644 --- a/plugins/spu2-x/src/CMakeLists.txt +++ b/plugins/spu2-x/src/CMakeLists.txt @@ -1,3 +1,9 @@ +if (OpenSuse) + # OpenSuse don't install wx in a standard library system + # path. Let's bypass the dynamic linker and hardcode the path. + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON) +endif() + # Check that people use the good file if(NOT TOP_CMAKE_WAS_SOURCED) message(FATAL_ERROR " diff --git a/plugins/zzogl-pg/opengl/CMakeLists.txt b/plugins/zzogl-pg/opengl/CMakeLists.txt index 4a2aea095b..f16a881220 100644 --- a/plugins/zzogl-pg/opengl/CMakeLists.txt +++ b/plugins/zzogl-pg/opengl/CMakeLists.txt @@ -1,3 +1,9 @@ +if (OpenSuse) + # OpenSuse don't install wx in a standard library system + # path. Let's bypass the dynamic linker and hardcode the path. + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON) +endif() + # Check that people use the good file if(NOT TOP_CMAKE_WAS_SOURCED) message(FATAL_ERROR "