new: export plugin paths in pkg-config and cmake package
To simplify building external channels and other plugins related paths are now exported in the pkg-config file and the cmake package. The paths can be used to install channels/plugins/extensions in the configured search paths. For pkg-config the following variables are now available: * datadir * plugindir * proxy_plugindir * extensiondir They can be queried like: `pkg-config freerdp3 --variable plugindir` The cmake package has three new variables that can be used: * FreeRDP_PLUGIN_DIR * FreeRDP_PROXY_PLUGIN_DIR * FreeRDP_EXTENSION_DIR Note: Depending on the build the directories are not necessarily created.
This commit is contained in:
parent
ecc32eaf2e
commit
ddc9e5835f
@ -134,7 +134,8 @@ endif()
|
||||
|
||||
message(STATUS "Git Revision ${GIT_REVISION}")
|
||||
|
||||
set(FREERDP_INCLUDE_DIR "include/freerdp${FREERDP_VERSION_MAJOR}/")
|
||||
set(FREERDP_MAJOR_DIR "freerdp${FREERDP_VERSION_MAJOR}")
|
||||
set(FREERDP_INCLUDE_DIR "include/${FREERDP_MAJOR_DIR}/")
|
||||
|
||||
option(WITH_SMARTCARD_EMULATE "Emulate smartcards instead of redirecting readers" OFF)
|
||||
if (WITH_SMARTCARD_EMULATE)
|
||||
@ -824,18 +825,19 @@ if (ANDROID OR WIN32 OR MAC_BUNDLE)
|
||||
set(FREERDP_LIBRARY_PATH ".")
|
||||
set(FREERDP_PLUGIN_PATH ".")
|
||||
else()
|
||||
set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp${FREERDP_VERSION_MAJOR}")
|
||||
set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/${FREERDP_MAJOR_DIR}")
|
||||
if (NOT FREERDP_INSTALL_PREFIX)
|
||||
set(FREERDP_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
set(FREERDP_LIBRARY_PATH "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}/freerdp${FREERDP_VERSION_MAJOR}")
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}/${FREERDP_MAJOR_DIR}")
|
||||
endif()
|
||||
set(FREERDP_ADDIN_PATH "${FREERDP_PLUGIN_PATH}")
|
||||
|
||||
# Path to put extensions
|
||||
set(FREERDP_EXTENSION_REL_PATH "${CMAKE_INSTALL_LIBDIR}/freerdp${FREERDP_VERSION_MAJOR}/extensions")
|
||||
set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp${FREERDP_VERSION_MAJOR}/extensions")
|
||||
set(FREERDP_EXTENSION_POSTFIX "${FREERDP_MAJOR_DIR}/extensions")
|
||||
set(FREERDP_EXTENSION_REL_PATH "${CMAKE_INSTALL_LIBDIR}/${FREERDP_EXTENSION_POSTFIX}")
|
||||
set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/${FREERDP_EXTENSION_POSTFIX}")
|
||||
|
||||
# Proxy plugins path
|
||||
if(NOT DEFINED PROXY_PLUGINDIR)
|
||||
|
@ -435,7 +435,7 @@ SetFreeRDPCMakeInstallDir(FREERDP_CMAKE_INSTALL_DIR "FreeRDP${FREERDP_VERSION_MA
|
||||
|
||||
configure_package_config_file(FreeRDPConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfig.cmake
|
||||
INSTALL_DESTINATION ${FREERDP_CMAKE_INSTALL_DIR}
|
||||
PATH_VARS FREERDP_INCLUDE_DIR)
|
||||
PATH_VARS FREERDP_INCLUDE_DIR FREERDP_PLUGIN_PATH)
|
||||
|
||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfigVersion.cmake
|
||||
VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion)
|
||||
|
@ -6,5 +6,8 @@ set(FreeRDP_VERSION_MINOR "@FREERDP_VERSION_MINOR@")
|
||||
set(FreeRDP_VERSION_REVISION "@FREERDP_VERSION_REVISION@")
|
||||
|
||||
set_and_check(FreeRDP_INCLUDE_DIR "@PACKAGE_FREERDP_INCLUDE_DIR@")
|
||||
set(FreeRDP_PLUGIN_DIR "@PACKAGE_FREERDP_PLUGIN_PATH@")
|
||||
set(FreeRDP_PROXY_PLUGIN_DIR "${FreeRDP_PLUGIN_DIR}/proxy")
|
||||
set(FreeRDP_EXTENSION_DIR "${FreeRDP_PLUGIN_DIR}/extensions")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/FreeRDPTargets.cmake")
|
||||
|
@ -3,6 +3,11 @@ exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
includedir=${prefix}/@FREERDP_INCLUDE_DIR@
|
||||
libs=-lfreerdp@FREERDP_API_VERSION@
|
||||
datarootdir=${prefix}/share
|
||||
datadir=${datarootdir}/@FREERDP_MAJOR_DIR@
|
||||
plugindir=${libdir}/@FREERDP_MAJOR_DIR@
|
||||
proxy_plugindir=${plugindir}/proxy
|
||||
extensiondir=${plugindir}/extensions
|
||||
|
||||
Name: FreeRDP
|
||||
Description: FreeRDP: A Remote Desktop Protocol Implementation
|
||||
|
Loading…
Reference in New Issue
Block a user