mirror of https://github.com/FreeRDP/FreeRDP
cmake: Allow CMAKE_INSTALL_LIBDIR to be an absolute path.
On Gentoo Linux, CMAKE_INSTALL_LIBDIR is passed as an absolute path, which caused plugins to be installed in /usr/usr/lib/freerdp. The new logic better emulates the behavior of the real GNUInstallDirs module.
This commit is contained in:
parent
48392a4dad
commit
714fae8f1c
|
@ -173,10 +173,10 @@ set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp")
|
|||
set(FREERDP_KEYMAP_PATH "${FREERDP_DATA_PATH}/keymaps")
|
||||
|
||||
# Path to put plugins
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/freerdp")
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp")
|
||||
|
||||
# Path to put extensions
|
||||
set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/freerdp/extensions")
|
||||
set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp/extensions")
|
||||
|
||||
# Include directories
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
@ -9,5 +9,13 @@ if(GID_PATH STREQUAL "NOTFOUND")
|
|||
set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE PATH "object code libraries (lib)")
|
||||
endif()
|
||||
|
||||
foreach(dir BINDIR LIBDIR)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
mark_as_advanced(CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR)
|
||||
endif()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_PREFIX@/include
|
||||
|
||||
Name: FreeRDP
|
||||
|
|
Loading…
Reference in New Issue