mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Add path to libvcmi.so into RPATH so dynamic linker can find it
This commit is contained in:
parent
fb1a6b734f
commit
31ac1e4ab2
@ -382,22 +382,24 @@ 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")
|
||||||
|
set(CMAKE_INSTALL_RPATH "$ORIGIN/")
|
||||||
else()
|
else()
|
||||||
if(NOT BIN_DIR)
|
if(NOT BIN_DIR)
|
||||||
set(BIN_DIR "bin" CACHE STRING "Where to install binaries")
|
set(BIN_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING "Where to install binaries")
|
||||||
endif()
|
endif()
|
||||||
if(NOT LIB_DIR)
|
if(NOT LIB_DIR)
|
||||||
set(LIB_DIR "${CMAKE_INSTALL_LIBDIR}/vcmi" CACHE STRING "Where to install main library")
|
set(LIB_DIR "${CMAKE_INSTALL_LIBDIR}/vcmi" CACHE STRING "Where to install main library")
|
||||||
endif()
|
endif()
|
||||||
if(NOT DATA_DIR)
|
if(NOT DATA_DIR)
|
||||||
set(DATA_DIR "share/vcmi" CACHE STRING "Where to install data files")
|
set(DATA_DIR "${CMAKE_INSTALL_DATAROOTDIR}/vcmi" CACHE STRING "Where to install data files")
|
||||||
endif()
|
endif()
|
||||||
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# following constants only used for platforms using XDG (Linux, BSD, etc)
|
# following constants only used for platforms using XDG (Linux, BSD, etc)
|
||||||
add_definitions(-DM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}")
|
add_definitions(-DM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}")
|
||||||
add_definitions(-DM_BIN_DIR="${CMAKE_INSTALL_PREFIX}/${BIN_DIR}")
|
add_definitions(-DM_BIN_DIR="${CMAKE_INSTALL_PREFIX}/${BIN_DIR}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user