Merge pull request #4614 from kevans91/cmakemod

Abstract away CMake module installation setting, install differently on FreeBSD
This commit is contained in:
akallabeth 2018-05-03 09:49:31 +02:00 committed by GitHub
commit 613e0be208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 6 deletions

View File

@ -68,6 +68,7 @@ include(GNUInstallDirsWrapper)
include(CMakePackageConfigHelpers)
include(InstallFreeRDPMan)
include(GetGitRevisionDescription)
include(SetFreeRDPCMakeInstallDir)
# Soname versioning
set(BUILD_NUMBER 0)

View File

@ -89,7 +89,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
export(PACKAGE freerdp-client)
set(FREERDP_CLIENT_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP-Client${FREERDP_VERSION_MAJOR}")
SetFreeRDPCMakeInstallDir(FREERDP_CLIENT_CMAKE_INSTALL_DIR "FreeRDP-Client${FREERDP_VERSION_MAJOR}")
configure_package_config_file(FreeRDP-ClientConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfig.cmake
INSTALL_DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR}

View File

@ -0,0 +1,7 @@
function(SetFreeRDPCMakeInstallDir SETVAR subdir)
if(FREEBSD)
set(${SETVAR} "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules/${subdir}" PARENT_SCOPE)
else()
set(${SETVAR} "${CMAKE_INSTALL_LIBDIR}/cmake/${subdir}" PARENT_SCOPE)
endif()
endfunction()

View File

@ -340,7 +340,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
export(PACKAGE freerdp)
set(FREERDP_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP${FREERDP_VERSION_MAJOR}")
SetFreeRDPCMakeInstallDir(FREERDP_CMAKE_INSTALL_DIR "FreeRDP${FREERDP_VERSION_MAJOR}")
configure_package_config_file(FreeRDPConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDPConfig.cmake
INSTALL_DESTINATION ${FREERDP_CMAKE_INSTALL_DIR}

View File

@ -71,7 +71,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
export(PACKAGE freerdp-server)
set(FREERDP_SERVER_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP-Server${FREERDP_VERSION_MAJOR}")
SetFreeRDPCMakeInstallDir(FREERDP_SERVER_CMAKE_INSTALL_DIR "FreeRDP-Server${FREERDP_VERSION_MAJOR}")
configure_package_config_file(FreeRDP-ServerConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfig.cmake
INSTALL_DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR}

View File

@ -349,7 +349,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
export(PACKAGE freerdp-shadow)
set(FREERDP_SERVER_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/FreeRDP-Shadow${FREERDP_VERSION_MAJOR}")
SetFreeRDPCMakeInstallDir(FREERDP_SERVER_CMAKE_INSTALL_DIR "FreeRDP-Shadow${FREERDP_VERSION_MAJOR}")
configure_package_config_file(FreeRDP-ShadowConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfig.cmake
INSTALL_DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR}

View File

@ -32,7 +32,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
export(PACKAGE uwac)
set(UWAC_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/uwac${UWAC_VERSION_MAJOR}")
SetFreeRDPCMakeInstallDir(UWAC_CMAKE_INSTALL_DIR "uwac${UWAC_VERSION_MAJOR}")
configure_package_config_file(uwacConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/uwacConfig.cmake

View File

@ -187,7 +187,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
export(PACKAGE winpr)
set(WINPR_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/WinPR${WINPR_VERSION_MAJOR}")
SetFreeRDPCMakeInstallDir(WINPR_CMAKE_INSTALL_DIR "WinPR${WINPR_VERSION_MAJOR}")
set(WINPR_INCLUDE_DIR "include/winpr${WINPR_VERSION_MAJOR}")