From 25e50bf43c0b6a35e0688685efbe59f20d50c839 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 31 May 2017 19:39:38 +0100 Subject: [PATCH] Set CMAKE_INSTALL_RPATH before adding executables. --- src/openrct2-ui/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 091381affa..2ae3a9fb61 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -7,6 +7,10 @@ endif () # Options option(DISABLE_OPENGL "Disable OpenGL support.") +if (PORTABLE) + set(CMAKE_INSTALL_RPATH "$ORIGIN") +endif () + # CMake dependencies include(FindPkgConfig) @@ -76,10 +80,6 @@ if (WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__USE_MINGW_ANSI_STDIO=1") endif () -if (PORTABLE) - set(CMAKE_INSTALL_RPATH "$ORIGIN") -endif () - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ${TARGET_M}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 ${TARGET_M}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TARGET_M}")