cmake: add vendor-specific packaging extension point

This commit is contained in:
Marc-André Moreau 2013-09-09 22:25:47 -04:00
parent 660e904a53
commit ef88801839
2 changed files with 24 additions and 1 deletions

View File

@ -22,6 +22,10 @@ cmake_minimum_required(VERSION 2.8)
project(FreeRDP C)
if(NOT DEFINED VENDOR)
set(VENDOR "FreeRDP" CACHE STRING "FreeRDP package vendor")
endif()
set(CMAKE_COLOR_MAKEFILE ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@ -496,4 +500,20 @@ if(WITH_SERVER)
endif()
# Packaging
include(CMakeCPack.cmake)
set(CMAKE_CPACK_INCLUDE_FILE "CMakeCPack.cmake")
if(NOT (VENDOR MATCHES "FreeRDP"))
message("VENDOR: ${VENDOR} CLIENT_VENDOR_PATH: ${CLIENT_VENDOR_PATH}")
if(DEFINED CLIENT_VENDOR_PATH)
if(EXISTS "${CLIENT_VENDOR_PATH}/CMakeCPack.cmake")
set(CMAKE_CPACK_INCLUDE_FILE "${CLIENT_VENDOR_PATH}/CMakeCPack.cmake")
endif()
endif()
endif()
message("CMAKE_CPACK_INCLUDE_FILE: ${CMAKE_CPACK_INCLUDE_FILE}")
include(${CMAKE_CPACK_INCLUDE_FILE})

View File

@ -64,6 +64,9 @@ foreach(FILEPATH ${FILEPATHS})
if(FREERDP_CLIENT_ENABLED)
if(NOT (${FREERDP_CLIENT_VENDOR} MATCHES "FreeRDP"))
list(APPEND FREERDP_EXTRA_CLIENTS ${FREERDP_CLIENT})
if(${FREERDP_CLIENT_VENDOR} MATCHES "${VENDOR}")
set(CLIENT_VENDOR_PATH "client/${FREERDP_CLIENT}" PARENT_SCOPE)
endif()
endif()
endif()
endif()