2011-07-03 01:58:55 +08:00
|
|
|
# FreeRDP: A Remote Desktop Protocol Client
|
|
|
|
# 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>
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
project(FreeRDP C)
|
|
|
|
set(CMAKE_COLOR_MAKEFILE ON)
|
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Include cmake modules
|
|
|
|
include(CheckIncludeFiles)
|
|
|
|
include(CheckLibraryExists)
|
|
|
|
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)
|
2011-07-03 03:44:40 +08:00
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
# Soname versioning - 0.0.0 since it is not being managed yet
|
|
|
|
set(FREERDP_VERSION_MAJOR "0")
|
|
|
|
set(FREERDP_VERSION_MINOR "0")
|
|
|
|
set(FREERDP_VERSION_PATCH "0")
|
|
|
|
set(FREERDP_VERSION "${FREERDP_VERSION_MAJOR}.${FREERDP_VERSION_MINOR}")
|
|
|
|
set(FREERDP_VERSION_FULL "${FREERDP_VERSION}.${FREERDP_VERSION_PATCH}")
|
|
|
|
|
|
|
|
# Default to release build type
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
endif()
|
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Include files
|
|
|
|
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
|
|
|
|
check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
|
|
|
|
check_include_files(netdb.h HAVE_NETDB_H)
|
|
|
|
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-07-04 11:40:26 +08:00
|
|
|
|
|
|
|
# Endian
|
|
|
|
test_big_endian(BIG_ENDIAN)
|
|
|
|
|
2011-07-01 08:31:07 +08:00
|
|
|
# Path to put keymaps
|
|
|
|
set(FREERDP_KEYMAP_PATH "${CMAKE_INSTALL_PREFIX}/freerdp/keymaps")
|
|
|
|
|
2011-07-08 14:28:52 +08:00
|
|
|
# Path to put plugins
|
|
|
|
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/lib/freerdp")
|
|
|
|
|
2011-07-04 15:41:53 +08:00
|
|
|
# Include directories
|
2011-07-13 23:05:25 +08:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
2011-07-04 15:41:53 +08:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/include)
|
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Configure files
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
|
|
|
|
2011-07-06 08:44:26 +08:00
|
|
|
# Mac OS X
|
|
|
|
if(APPLE)
|
|
|
|
include_directories(/opt/local/include)
|
|
|
|
link_directories(/opt/local/lib)
|
|
|
|
endif()
|
|
|
|
|
2011-07-03 02:23:59 +08:00
|
|
|
# Build CUnit
|
|
|
|
find_package(CUnit)
|
|
|
|
if(CUNIT_FOUND)
|
|
|
|
add_subdirectory(cunit)
|
|
|
|
endif()
|
|
|
|
|
2011-07-04 11:40:26 +08:00
|
|
|
# Sub-directories
|
2011-07-01 08:31:07 +08:00
|
|
|
add_subdirectory(include)
|
|
|
|
add_subdirectory(libfreerdp-asn1)
|
|
|
|
add_subdirectory(libfreerdp-utils)
|
|
|
|
add_subdirectory(libfreerdp-kbd)
|
2011-07-01 09:23:36 +08:00
|
|
|
add_subdirectory(libfreerdp-gdi)
|
2011-07-08 21:36:40 +08:00
|
|
|
add_subdirectory(libfreerdp-chanman)
|
2011-07-03 02:40:03 +08:00
|
|
|
add_subdirectory(libfreerdp-core)
|
2011-07-10 22:24:47 +08:00
|
|
|
add_subdirectory(channels)
|
2011-07-04 00:42:35 +08:00
|
|
|
add_subdirectory(freerdp-ui)
|