1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-02 00:10:22 +02:00

CMake: add $ORIGIN into RPATH for single-directory installation

End up that single-directory installation is useful for Snap package.
This commit is contained in:
Arseniy Shestakov 2017-09-08 03:40:00 +03:00
parent d01ecbba90
commit 940c8a0b82

View File

@ -54,7 +54,7 @@ option(ENABLE_PCH "Enable compilation using precompiled headers" ON)
option(ENABLE_GITVERSION "Enable Version.cpp with Git commit hash" ON) option(ENABLE_GITVERSION "Enable Version.cpp with Git commit hash" ON)
option(ENABLE_DEBUG_CONSOLE "Enable debug console for Windows builds" ON) option(ENABLE_DEBUG_CONSOLE "Enable debug console for Windows builds" ON)
# Useful for debugging # Used for Snap packages and also useful for debugging
option(ENABLE_MONOLITHIC_INSTALL "Install everything in single directory on Linux and Mac" OFF) option(ENABLE_MONOLITHIC_INSTALL "Install everything in single directory on Linux and Mac" OFF)
# Allow to pass package name from Travis CI # Allow to pass package name from Travis CI
@ -250,6 +250,7 @@ else()
include(GNUInstallDirs) include(GNUInstallDirs)
if(ENABLE_MONOLITHIC_INSTALL) if(ENABLE_MONOLITHIC_INSTALL)
set(CMAKE_INSTALL_RPATH "$ORIGIN/")
set(BIN_DIR "." CACHE STRING "Where to install binaries") set(BIN_DIR "." CACHE STRING "Where to install binaries")
set(LIB_DIR "." CACHE STRING "Where to install main library") set(LIB_DIR "." CACHE STRING "Where to install main library")
set(DATA_DIR "." CACHE STRING "Where to install data files") set(DATA_DIR "." CACHE STRING "Where to install data files")