Merge pull request #4614 from kevans91/cmakemod
Abstract away CMake module installation setting, install differently on FreeBSD
This commit is contained in:
commit
613e0be208
@ -68,6 +68,7 @@ include(GNUInstallDirsWrapper)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(InstallFreeRDPMan)
|
||||
include(GetGitRevisionDescription)
|
||||
include(SetFreeRDPCMakeInstallDir)
|
||||
|
||||
# Soname versioning
|
||||
set(BUILD_NUMBER 0)
|
||||
|
@ -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}
|
||||
|
7
cmake/SetFreeRDPCMakeInstallDir.cmake
Normal file
7
cmake/SetFreeRDPCMakeInstallDir.cmake
Normal 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()
|
@ -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}
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user