2012-10-09 11:02:04 +08:00
|
|
|
# FreeRDP: A Remote Desktop Protocol Implementation
|
2011-07-03 01:58:55 +08:00
|
|
|
# FreeRDP cmake build script
|
|
|
|
#
|
|
|
|
# Copyright 2011 O.S. Systems Software Ltda.
|
|
|
|
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
|
|
|
|
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
2012-06-14 03:45:58 +08:00
|
|
|
# Copyright 2012 HP Development Company, LLC
|
2011-07-03 01:58:55 +08:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2012-10-04 21:42:23 +08:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
project(FreeRDP C)
|
2012-10-04 21:42:23 +08:00
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
set(CMAKE_COLOR_MAKEFILE ON)
|
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Include cmake modules
|
|
|
|
include(CheckIncludeFiles)
|
|
|
|
include(CheckLibraryExists)
|
2012-02-16 05:28:47 +08:00
|
|
|
include(CheckStructHasMember)
|
2012-10-13 04:37:45 +08:00
|
|
|
include(CMakeDetermineSystem)
|
2011-08-15 18:21:58 +08:00
|
|
|
include(FindPkgConfig)
|
2011-07-04 11:40:26 +08:00
|
|
|
include(TestBigEndian)
|
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
# Include our extra modules
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
|
|
|
|
|
2011-07-03 03:44:40 +08:00
|
|
|
include(AutoVersioning)
|
2011-07-04 17:01:06 +08:00
|
|
|
include(ConfigOptions)
|
2012-10-14 03:20:39 +08:00
|
|
|
include(ComplexLibrary)
|
2012-09-14 17:09:51 +08:00
|
|
|
include(BuildFeatureCheck)
|
2011-08-19 02:36:17 +08:00
|
|
|
include(FindOptionalPackage)
|
2011-09-20 11:02:07 +08:00
|
|
|
include(CheckCCompilerFlag)
|
2011-12-06 13:02:07 +08:00
|
|
|
include(GNUInstallDirsWrapper)
|
2011-07-03 03:44:40 +08:00
|
|
|
|
2012-01-15 02:33:04 +08:00
|
|
|
# Soname versioning
|
2011-11-11 04:46:46 +08:00
|
|
|
set(FREERDP_VERSION_MAJOR "1")
|
2012-09-21 08:45:56 +08:00
|
|
|
set(FREERDP_VERSION_MINOR "1")
|
|
|
|
set(FREERDP_VERSION_REVISION "0")
|
2011-07-01 08:31:07 +08:00
|
|
|
set(FREERDP_VERSION "${FREERDP_VERSION_MAJOR}.${FREERDP_VERSION_MINOR}")
|
2012-01-15 02:33:04 +08:00
|
|
|
set(FREERDP_VERSION_FULL "${FREERDP_VERSION}.${FREERDP_VERSION_REVISION}")
|
2012-07-27 09:08:30 +08:00
|
|
|
include(GetGitRevisionDescription)
|
|
|
|
git_describe(GIT_REVISION --match "[0-9]*" --abbrev=4 --tags --always)
|
|
|
|
message(STATUS "Git Revision ${GIT_REVISION}")
|
2011-07-01 08:31:07 +08:00
|
|
|
|
2012-10-01 10:58:59 +08:00
|
|
|
# Turn on solution folders (2.8.4+)
|
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
# Default to release build type
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
endif()
|
|
|
|
|
2012-03-22 03:46:37 +08:00
|
|
|
# Default to build shared libs
|
|
|
|
if(NOT DEFINED BUILD_SHARED_LIBS)
|
2012-08-13 06:47:19 +08:00
|
|
|
set(BUILD_SHARED_LIBS ON)
|
2011-09-01 22:18:58 +08:00
|
|
|
endif()
|
|
|
|
|
2012-09-22 07:28:47 +08:00
|
|
|
# Configure MSVC Runtime
|
|
|
|
if(MSVC)
|
|
|
|
include(MSVCRuntime)
|
|
|
|
if(NOT DEFINED MSVC_RUNTIME)
|
|
|
|
set(MSVC_RUNTIME "dynamic")
|
|
|
|
endif()
|
2012-09-23 05:10:08 +08:00
|
|
|
if(${MSVC_RUNTIME} STREQUAL "static")
|
|
|
|
message(STATUS "Use the MSVC static runtime option carefully!")
|
|
|
|
message(STATUS "OpenSSL uses /MD by default, and is very picky")
|
|
|
|
message(STATUS "Random freeing errors are a common sign of runtime issues")
|
|
|
|
endif()
|
2012-09-22 07:28:47 +08:00
|
|
|
configure_msvc_runtime()
|
|
|
|
endif()
|
|
|
|
|
2011-08-11 15:03:08 +08:00
|
|
|
# Compiler-specific flags
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
2011-09-20 11:02:07 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
2011-10-05 06:47:21 +08:00
|
|
|
CHECK_C_COMPILER_FLAG (-Wno-unused-result Wno-unused-result)
|
|
|
|
if(Wno-unused-result)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result")
|
|
|
|
endif()
|
2011-09-20 11:02:07 +08:00
|
|
|
CHECK_C_COMPILER_FLAG (-Wno-unused-but-set-variable Wno-unused-but-set-variable)
|
|
|
|
if(Wno-unused-but-set-variable)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable")
|
|
|
|
endif()
|
2012-10-17 14:14:19 +08:00
|
|
|
CHECK_C_COMPILER_FLAG(-Wno-deprecated-declarations Wno-deprecated-declarations)
|
|
|
|
if(Wno-deprecated-declarations)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
|
|
|
|
endif()
|
2012-10-19 03:37:00 +08:00
|
|
|
if(BUILD_TESTING)
|
|
|
|
CHECK_C_COMPILER_FLAG(-Wno-format Wno-format)
|
|
|
|
if(Wno-format)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
|
|
|
|
endif()
|
|
|
|
endif()
|
2011-08-25 10:53:06 +08:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
2012-01-20 18:37:55 +08:00
|
|
|
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
|
2011-08-11 15:03:08 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
|
|
|
endif()
|
2012-10-11 20:30:04 +08:00
|
|
|
if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
|
|
|
endif()
|
2012-10-13 05:55:12 +08:00
|
|
|
if(WITH_SSE2)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
|
|
|
|
endif()
|
2011-08-11 15:03:08 +08:00
|
|
|
endif()
|
|
|
|
|
2011-08-17 02:41:12 +08:00
|
|
|
if(MSVC)
|
2012-09-03 22:47:45 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gd")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /O2")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ob2")
|
2012-08-08 08:48:29 +08:00
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_AMD64_")
|
|
|
|
else()
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_X86_")
|
|
|
|
endif()
|
2011-09-24 02:38:16 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_UNICODE")
|
2012-05-05 07:36:35 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINPR_EXPORTS")
|
2011-08-17 09:08:14 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFREERDP_EXPORTS")
|
2012-08-31 07:57:21 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0501")
|
2011-08-17 05:40:29 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")
|
2011-09-25 15:12:29 +08:00
|
|
|
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
|
|
|
|
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
|
2011-08-17 02:41:12 +08:00
|
|
|
endif()
|
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Include files
|
|
|
|
check_include_files(fcntl.h HAVE_FCNTL_H)
|
2011-07-08 16:07:25 +08:00
|
|
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
2011-11-20 01:19:16 +08:00
|
|
|
check_include_files(stdint.h HAVE_STDINT_H)
|
|
|
|
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
2012-08-15 05:09:01 +08:00
|
|
|
check_include_files(sys/modem.h HAVE_SYS_MODEM_H)
|
|
|
|
check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
|
|
|
|
check_include_files(sys/strtio.h HAVE_SYS_STRTIO_H)
|
2011-07-04 11:40:26 +08:00
|
|
|
|
2012-02-16 05:28:47 +08:00
|
|
|
check_struct_has_member("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
|
|
|
|
|
2011-11-16 12:21:53 +08:00
|
|
|
# Mac OS X
|
|
|
|
if(APPLE)
|
2012-08-01 04:22:10 +08:00
|
|
|
if(IS_DIRECTORY /opt/local/include)
|
|
|
|
include_directories(/opt/local/include)
|
|
|
|
link_directories(/opt/local/lib)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_CLANG)
|
|
|
|
set(CMAKE_C_COMPILER "clang")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.4")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl-framework,CoreFoundation")
|
2011-11-16 12:21:53 +08:00
|
|
|
endif()
|
|
|
|
|
2012-10-14 08:31:01 +08:00
|
|
|
# Android
|
|
|
|
if(ANDROID)
|
|
|
|
set(WITH_X11 OFF)
|
|
|
|
set(WITH_CUPS OFF)
|
|
|
|
set(WITH_ALSA OFF)
|
2012-10-17 14:14:19 +08:00
|
|
|
set(WITH_PULSE OFF)
|
2012-10-14 08:31:01 +08:00
|
|
|
set(WITH_FFMPEG OFF)
|
|
|
|
set(WITH_GSTREAMER OFF)
|
|
|
|
set(WITH_PCSC OFF)
|
|
|
|
endif()
|
|
|
|
|
2011-08-16 10:34:15 +08:00
|
|
|
if(NOT WIN32)
|
2011-08-31 04:39:46 +08:00
|
|
|
find_required_package(ZLIB)
|
2011-08-19 02:36:17 +08:00
|
|
|
find_optional_package(PulseAudio)
|
2012-05-03 11:15:27 +08:00
|
|
|
find_optional_package(MacAudio)
|
2011-10-15 23:30:10 +08:00
|
|
|
find_optional_package(PCSC)
|
2012-10-14 08:31:01 +08:00
|
|
|
|
|
|
|
if(NOT ANDROID)
|
|
|
|
find_suggested_package(Cups)
|
|
|
|
endif()
|
2011-11-16 12:21:53 +08:00
|
|
|
|
|
|
|
if(NOT APPLE)
|
2012-06-15 00:31:29 +08:00
|
|
|
find_suggested_package(XRandR)
|
2012-06-14 03:45:58 +08:00
|
|
|
find_suggested_package(Gstreamer)
|
2012-10-14 08:31:01 +08:00
|
|
|
if(NOT ANDROID)
|
|
|
|
find_suggested_package(ALSA)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT ANDROID)
|
|
|
|
find_suggested_package(FFmpeg)
|
2011-11-16 12:21:53 +08:00
|
|
|
endif()
|
2011-08-16 05:05:48 +08:00
|
|
|
endif()
|
2011-07-31 09:22:09 +08:00
|
|
|
|
2012-10-07 22:21:54 +08:00
|
|
|
if(WIN32)
|
|
|
|
set(CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_PREFIX})
|
|
|
|
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX})
|
|
|
|
set(CMAKE_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX})
|
|
|
|
endif()
|
|
|
|
|
2012-02-19 11:04:28 +08:00
|
|
|
# Path to put FreeRDP data
|
|
|
|
set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp")
|
|
|
|
set(FREERDP_KEYMAP_PATH "${FREERDP_DATA_PATH}/keymaps")
|
2011-07-01 08:31:07 +08:00
|
|
|
|
2011-07-08 14:28:52 +08:00
|
|
|
# Path to put plugins
|
2012-10-17 14:14:19 +08:00
|
|
|
|
2012-10-07 22:21:54 +08:00
|
|
|
if(WIN32)
|
2012-10-17 14:14:19 +08:00
|
|
|
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}")
|
2012-10-07 22:21:54 +08:00
|
|
|
else()
|
2012-10-17 14:14:19 +08:00
|
|
|
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}/freerdp")
|
2012-10-07 22:21:54 +08:00
|
|
|
endif()
|
|
|
|
|
2012-09-23 08:16:38 +08:00
|
|
|
set(FREERDP_CLIENT_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}/client")
|
|
|
|
set(FREERDP_SERVER_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}/server")
|
2011-07-08 14:28:52 +08:00
|
|
|
|
2012-07-03 15:51:00 +08:00
|
|
|
# Path to put extensions
|
2012-08-15 12:26:04 +08:00
|
|
|
set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp/extensions")
|
2012-07-03 15:51:00 +08:00
|
|
|
|
2011-07-04 15:41:53 +08:00
|
|
|
# Include directories
|
2012-08-14 11:19:51 +08:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
2012-08-15 08:21:00 +08:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
2011-07-04 15:41:53 +08:00
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Configure files
|
2012-08-15 05:09:01 +08:00
|
|
|
add_definitions("-DHAVE_CONFIG_H")
|
2012-08-15 03:49:39 +08:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
|
2011-07-04 11:40:26 +08:00
|
|
|
|
2012-10-15 00:58:09 +08:00
|
|
|
# RPATH configuration
|
2012-10-16 05:13:54 +08:00
|
|
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
|
|
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
|
|
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
|
2012-10-15 00:58:09 +08:00
|
|
|
|
2012-10-01 08:15:42 +08:00
|
|
|
# Unit Tests
|
|
|
|
|
|
|
|
INCLUDE(CTest)
|
|
|
|
|
2012-10-13 21:50:02 +08:00
|
|
|
if(BUILD_TESTING)
|
2012-10-01 08:15:42 +08:00
|
|
|
enable_testing()
|
2012-10-19 03:37:00 +08:00
|
|
|
set(TESTING_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Testing")
|
2012-10-01 08:15:42 +08:00
|
|
|
endif()
|
|
|
|
|
2012-09-21 08:45:56 +08:00
|
|
|
# WinPR
|
|
|
|
set(WINPR_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/winpr/include")
|
|
|
|
include_directories(${WINPR_INCLUDE_DIR})
|
|
|
|
|
|
|
|
add_subdirectory(winpr)
|
|
|
|
|
2011-10-16 07:25:34 +08:00
|
|
|
# Generate pkg-config
|
2012-08-01 04:14:17 +08:00
|
|
|
if(NOT MSVC)
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc @ONLY)
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
|
|
endif()
|
2011-10-16 07:25:34 +08:00
|
|
|
|
2012-09-12 05:31:10 +08:00
|
|
|
# Intel Performance Primitives
|
|
|
|
#find_optional_package(IPP)
|
|
|
|
|
2011-07-03 02:23:59 +08:00
|
|
|
# Build CUnit
|
2012-10-01 08:15:42 +08:00
|
|
|
|
2011-08-31 02:38:05 +08:00
|
|
|
find_optional_package(CUnit)
|
2012-01-23 21:19:40 +08:00
|
|
|
if(WITH_CUNIT)
|
2012-08-13 06:05:25 +08:00
|
|
|
add_subdirectory(cunit)
|
2011-07-03 02:23:59 +08:00
|
|
|
endif()
|
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Sub-directories
|
2012-08-14 11:19:51 +08:00
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
add_subdirectory(include)
|
2012-05-22 04:01:24 +08:00
|
|
|
|
2012-08-14 11:19:51 +08:00
|
|
|
add_subdirectory(libfreerdp)
|
2011-08-17 11:54:42 +08:00
|
|
|
|
2012-08-13 06:05:25 +08:00
|
|
|
if(WITH_CHANNELS)
|
|
|
|
add_subdirectory(channels)
|
|
|
|
endif()
|
2011-07-18 11:16:31 +08:00
|
|
|
|
2012-01-23 01:26:30 +08:00
|
|
|
if(WITH_CLIENT)
|
2012-01-23 01:14:06 +08:00
|
|
|
add_subdirectory(client)
|
|
|
|
endif()
|
|
|
|
|
2012-01-23 01:26:30 +08:00
|
|
|
if(WITH_SERVER)
|
2012-01-23 01:14:06 +08:00
|
|
|
add_subdirectory(server)
|
|
|
|
endif()
|
|
|
|
|
2012-08-13 03:41:07 +08:00
|
|
|
if(WITH_THIRD_PARTY)
|
|
|
|
add_subdirectory(third-party)
|
2012-08-11 06:05:37 +08:00
|
|
|
endif()
|
|
|
|
|
2012-08-13 06:05:25 +08:00
|
|
|
if(NOT MSVC)
|
|
|
|
add_subdirectory(keymaps)
|
|
|
|
endif()
|
|
|
|
|
2012-10-17 09:57:43 +08:00
|
|
|
# Packaging
|
|
|
|
|
2011-10-19 20:21:14 +08:00
|
|
|
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/\\\\.gitignore;/CMakeCache.txt")
|
|
|
|
|
2012-10-17 09:57:43 +08:00
|
|
|
set(CPACK_PACKAGE_EXECUTABLES "xfreerdp")
|
|
|
|
|
|
|
|
if(WITH_SERVER)
|
|
|
|
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "xfreerdp-server")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FreeRDP: A Remote Desktop Protocol Implementation")
|
|
|
|
|
|
|
|
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
|
|
|
set(CPACK_TOPLEVEL_TAG "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
|
|
|
|
2011-10-19 20:21:14 +08:00
|
|
|
string(TOLOWER ${CMAKE_PROJECT_NAME} CMAKE_PROJECT_NAME_lower)
|
2012-10-17 09:57:43 +08:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME_lower}-${FREERDP_VERSION_FULL}-${CPACK_SYSTEM_NAME}")
|
|
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME_lower}-${FREERDP_VERSION_FULL}-${CPACK_SYSTEM_NAME}")
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_NAME "FreeRDP")
|
|
|
|
set(CPACK_PACKAGE_VENDOR "FreeRDP")
|
|
|
|
set(CPACK_PACKAGE_VERSION ${FREERDP_VERSION_FULL})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${FREERDP_VERSION_MINOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${FREERDP_VERSION_REVISION})
|
2011-10-19 20:21:14 +08:00
|
|
|
|
2012-10-18 06:14:35 +08:00
|
|
|
set(CPACK_SET_DESTDIR "on")
|
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/tmp")
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_CONTACT "Marc-Andre Moreau")
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "marcandre.moreau@gmail.com")
|
|
|
|
set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
|
|
|
|
|
2012-10-17 22:46:40 +08:00
|
|
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "FreeRDP")
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/LICENSE")
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
2012-10-17 14:14:19 +08:00
|
|
|
|
2012-10-18 01:07:29 +08:00
|
|
|
set(CPACK_NSIS_MODIFY_PATH ON)
|
2012-10-17 22:46:40 +08:00
|
|
|
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/resources\\\\FreeRDP_Install.bmp")
|
|
|
|
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/resources\\\\FreeRDP_Icon_96px.ico")
|
|
|
|
set(CPACK_NSIS_MUI_UNICON "${CMAKE_SOURCE_DIR}/resource\\\\FreeRDP_Icon_96px.ico")
|
2012-09-21 08:45:56 +08:00
|
|
|
|
2012-10-18 06:14:35 +08:00
|
|
|
if(MSVC)
|
|
|
|
if(MSVC_RUNTIME STREQUAL "dynamic")
|
|
|
|
include(InstallRequiredSystemLibraries)
|
|
|
|
endif()
|
2012-10-18 01:07:29 +08:00
|
|
|
endif()
|
|
|
|
|
2012-10-17 22:46:40 +08:00
|
|
|
include(CPack)
|
2012-10-18 01:07:29 +08:00
|
|
|
|
|
|
|
cpack_add_component(headers DISPLAY_NAME "Headers")
|
|
|
|
cpack_add_component(libraries DISPLAY_NAME "Libraries")
|
|
|
|
cpack_add_component(clients DISPLAY_NAME "Clients")
|
|
|
|
|
|
|
|
set(CPACK_COMPONENTS_ALL clients libraries headers)
|
2012-10-18 06:14:35 +08:00
|
|
|
|