Merge pull request #696 from FreeRDP/cleanup

CMake Improvements #1
This commit is contained in:
Marc-André Moreau 2012-08-12 15:08:27 -07:00
commit 3d92392699
13 changed files with 326 additions and 149 deletions

3
.gitignore vendored
View File

@ -19,9 +19,6 @@ CPackSourceConfig.cmake
docs/api docs/api
client/X11/xfreerdp.1 client/X11/xfreerdp.1
# Extensions
extensions/**
# Mac OS X # Mac OS X
.DS_Store .DS_Store

View File

@ -95,6 +95,12 @@ if(MSVC)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
endif() endif()
# config.h definition for installable headers
check_include_files(limits.h FREERDP_HAVE_LIMITS_H)
check_include_files(stdint.h FREERDP_HAVE_STDINT_H)
check_include_files(stdbool.h FREERDP_HAVE_STDBOOL_H)
check_include_files(inttypes.h FREERDP_HAVE_INTTYPES_H)
# Include files # Include files
check_include_files(fcntl.h HAVE_FCNTL_H) check_include_files(fcntl.h HAVE_FCNTL_H)
check_include_files(unistd.h HAVE_UNISTD_H) check_include_files(unistd.h HAVE_UNISTD_H)
@ -117,7 +123,6 @@ if(APPLE)
link_directories(/opt/local/lib) link_directories(/opt/local/lib)
endif() endif()
option(WITH_CLANG "Build using clang" OFF)
if(WITH_CLANG) if(WITH_CLANG)
set(CMAKE_C_COMPILER "clang") set(CMAKE_C_COMPILER "clang")
endif() endif()
@ -159,6 +164,7 @@ include_directories(${CMAKE_SOURCE_DIR}/include)
# Configure files # Configure files
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/freerdp/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/freerdp/config.h)
# Generate pkg-config # Generate pkg-config
if(NOT MSVC) if(NOT MSVC)
@ -169,8 +175,8 @@ endif()
# Build CUnit # Build CUnit
find_optional_package(CUnit) find_optional_package(CUnit)
if(WITH_CUNIT) if(WITH_CUNIT)
enable_testing() enable_testing()
add_subdirectory(cunit) add_subdirectory(cunit)
endif() endif()
# Sub-directories # Sub-directories
@ -188,25 +194,24 @@ add_subdirectory(libfreerdp-channels)
add_subdirectory(libfreerdp-locale) add_subdirectory(libfreerdp-locale)
add_subdirectory(libfreerdp-core) add_subdirectory(libfreerdp-core)
add_subdirectory(channels) if(WITH_CHANNELS)
add_subdirectory(channels)
endif()
option(WITH_CLIENT "Build client binaries" ON)
if(WITH_CLIENT) if(WITH_CLIENT)
add_subdirectory(client) add_subdirectory(client)
endif() endif()
option(WITH_SERVER "Build server binaries" OFF)
if(WITH_SERVER) if(WITH_SERVER)
add_subdirectory(server) add_subdirectory(server)
endif() endif()
if(NOT MSVC) if(WITH_THIRD_PARTY)
add_subdirectory(keymaps) add_subdirectory(third-party)
endif() endif()
option(WITH_EXTENSIONS "Build extensions" ON) if(NOT MSVC)
if(WITH_EXTENSIONS) add_subdirectory(keymaps)
add_subdirectory(extensions)
endif() endif()
# Source package # Source package

View File

@ -33,8 +33,6 @@
#include "rdpsnd_main.h" #include "rdpsnd_main.h"
#define GOT_HERE printf(">>>>> got here: %s %s %d\n", __FILE__, __func__, __LINE__)
#define AQ_NUM_BUFFERS 10 #define AQ_NUM_BUFFERS 10
#define AQ_BUF_SIZE (32 * 1024) #define AQ_BUF_SIZE (32 * 1024)
@ -63,8 +61,6 @@ static void rdpsnd_audio_close(rdpsndDevicePlugin* device)
{ {
rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin*) device; rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin*) device;
GOT_HERE;
AudioQueueStop(aq_plugin_p->aq_ref, 0); AudioQueueStop(aq_plugin_p->aq_ref, 0);
aq_plugin_p->is_open = 0; aq_plugin_p->is_open = 0;
} }
@ -74,8 +70,6 @@ static void rdpsnd_audio_open(rdpsndDevicePlugin* device, rdpsndFormat* format,
int rv; int rv;
int i; int i;
GOT_HERE;
rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin *) device; rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin *) device;
if (aq_plugin_p->is_open) { if (aq_plugin_p->is_open) {
return; return;
@ -123,13 +117,10 @@ static void rdpsnd_audio_open(rdpsndDevicePlugin* device, rdpsndFormat* format,
static void rdpsnd_audio_free(rdpsndDevicePlugin* device) static void rdpsnd_audio_free(rdpsndDevicePlugin* device)
{ {
GOT_HERE;
} }
static boolean rdpsnd_audio_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) static boolean rdpsnd_audio_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format)
{ {
GOT_HERE;
switch (format->wFormatTag) switch (format->wFormatTag)
{ {
case 1: /* PCM */ case 1: /* PCM */
@ -147,12 +138,10 @@ static boolean rdpsnd_audio_format_supported(rdpsndDevicePlugin* device, rdpsndF
static void rdpsnd_audio_set_format(rdpsndDevicePlugin* device, rdpsndFormat* format, int latency) static void rdpsnd_audio_set_format(rdpsndDevicePlugin* device, rdpsndFormat* format, int latency)
{ {
GOT_HERE;
} }
static void rdpsnd_audio_set_volume(rdpsndDevicePlugin* device, uint32 value) static void rdpsnd_audio_set_volume(rdpsndDevicePlugin* device, uint32 value)
{ {
GOT_HERE;
} }
static void rdpsnd_audio_play(rdpsndDevicePlugin* device, uint8* data, int size) static void rdpsnd_audio_play(rdpsndDevicePlugin* device, uint8* data, int size)
@ -161,8 +150,6 @@ static void rdpsnd_audio_play(rdpsndDevicePlugin* device, uint8* data, int size)
AudioQueueBufferRef aq_buf_ref; AudioQueueBufferRef aq_buf_ref;
int len; int len;
GOT_HERE;
if (!aq_plugin_p->is_open) { if (!aq_plugin_p->is_open) {
return; return;
} }
@ -188,8 +175,6 @@ static void rdpsnd_audio_play(rdpsndDevicePlugin* device, uint8* data, int size)
static void rdpsnd_audio_start(rdpsndDevicePlugin* device) static void rdpsnd_audio_start(rdpsndDevicePlugin* device)
{ {
GOT_HERE;
rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin *) device; rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin *) device;
AudioQueueStart(aq_plugin_p->aq_ref, NULL); AudioQueueStart(aq_plugin_p->aq_ref, NULL);
@ -206,7 +191,6 @@ static void aq_playback_cb(void *user_data,
AudioQueueBufferRef aq_buf_ref AudioQueueBufferRef aq_buf_ref
) )
{ {
GOT_HERE;
} }
int FreeRDPRdpsndDeviceEntry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints) int FreeRDPRdpsndDeviceEntry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
@ -214,8 +198,6 @@ int FreeRDPRdpsndDeviceEntry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
rdpsndAudioQPlugin* aqPlugin; rdpsndAudioQPlugin* aqPlugin;
RDP_PLUGIN_DATA* data; RDP_PLUGIN_DATA* data;
GOT_HERE;
aqPlugin = xnew(rdpsndAudioQPlugin); aqPlugin = xnew(rdpsndAudioQPlugin);
aqPlugin->device.Open = rdpsnd_audio_open; aqPlugin->device.Open = rdpsnd_audio_open;

View File

@ -87,23 +87,19 @@ if(APPLE)
endif() endif()
# OS X Interface Builder files # OS X Interface Builder files
set (MacFreeRDP_XIBS file (GLOB MacFreeRDP_XIBS
MainMenu.xib *.xib
Credits.rtf
) )
# Headers # Headers
set (MacFreeRDP_Headers file (GLOB MacFreeRDP_Headers
MRDPCursor.h *.h
MRDPView.h )
AppDelegate.h)
# Source # Source
set (MacFreeRDP_Source file (GLOB MacFreeRDP_Source
MRDPCursor.m *.m
MRDPView.m )
AppDelegate.m
main.m)
add_executable(MacFreeRDP add_executable(MacFreeRDP
${APP_TYPE} ${APP_TYPE}
@ -147,3 +143,4 @@ target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-cach
target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-gdi/Debug/libfreerdp-gdi.dylib) target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-gdi/Debug/libfreerdp-gdi.dylib)
target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-utils/Debug/libfreerdp-utils.dylib) target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-utils/Debug/libfreerdp-utils.dylib)
target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-codec/Debug/libfreerdp-codec.dylib) target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-codec/Debug/libfreerdp-codec.dylib)
target_link_libraries(MacFreeRDP ${CMAKE_SOURCE_DIR}/../../xcode/libfreerdp-rail/Debug/libfreerdp-rail.dylib)

View File

@ -4,6 +4,7 @@
#import "freerdp/gdi/gdi.h" #import "freerdp/gdi/gdi.h"
#import "freerdp/rail/rail.h" #import "freerdp/rail/rail.h"
#import "MRDPRailWindow.h"
@interface MRDPRailView : NSView @interface MRDPRailView : NSView
{ {
@ -14,9 +15,11 @@
char * pixelData; char * pixelData;
boolean mouseInClientArea; boolean mouseInClientArea;
boolean titleBarClicked; boolean titleBarClicked;
boolean gestureEventInProgress;
int width; int width;
int height; int height;
int savedWindowId; int savedWindowId;
int scrollWheelCount;
// store state info for some keys // store state info for some keys
int kdlshift; int kdlshift;
@ -36,16 +39,23 @@
int localMoveType; int localMoveType;
} }
@property (assign) MRDPRailWindow * mrdpRailWindow;
@property (assign) int windowIndex;
@property (assign) boolean activateWindow;
- (void) windowDidMove:(NSNotification *) notification;
- (void) updateDisplay; - (void) updateDisplay;
- (void) setRdpInstance:(freerdp *) instance width:(int) w andHeight:(int) h windowID:(int) windowID; - (void) setRdpInstance:(freerdp *) instance width:(int) w andHeight:(int) h windowID:(int) windowID;
- (BOOL) eventIsInClientArea :(NSEvent *) event :(int *) xptr :(int *) yptr; - (BOOL) eventIsInClientArea :(NSEvent *) event :(int *) xptr :(int *) yptr;
- (void) setupBmiRep:(int) width :(int) height; - (void) setupBmiRep:(int) width :(int) height;
- (void) releaseResources;
void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window); void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window);
void apple_to_windowMove(NSRect * r, RAIL_WINDOW_MOVE_ORDER * windowMove); void apple_to_windowMove(NSRect * r, RAIL_WINDOW_MOVE_ORDER * windowMove);
void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param); void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param);
void windows_to_apple_cords(NSRect * r); void windows_to_apple_cords(NSRect * r);
void rail_MoveWindow(rdpRail * rail, rdpWindow * window); void rail_MoveWindow(rdpRail * rail, rdpWindow * window);
void mac_rail_send_activate(int window_id);
@end @end

View File

@ -4,6 +4,8 @@
@implementation MRDPRailView @implementation MRDPRailView
@synthesize mrdpRailWindow, windowIndex, activateWindow;
MRDPRailView * g_mrdpRailView; MRDPRailView * g_mrdpRailView;
struct kkey struct kkey
@ -98,6 +100,11 @@ extern struct kkey g_keys[];
return YES; return YES;
} }
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
{
return NO;
}
/** ********************************************************************* /** *********************************************************************
* called when a mouse move event occurrs * called when a mouse move event occurrs
* *
@ -247,23 +254,23 @@ extern struct kkey g_keys[];
[super scrollWheel:event]; [super scrollWheel:event];
NSRect winFrame = [[self window] frame]; // we get more two finger trackpad scroll events
NSPoint loc = [event locationInWindow]; // than scrollWheel events, so we drop some
int x = (int) (winFrame.origin.x + loc.x);
int y = (int) (winFrame.origin.y + loc.y); if (gestureEventInProgress) {
y = height - y; scrollWheelCount++;
if (scrollWheelCount % 8 != 0)
return;
}
flags = PTR_FLAGS_WHEEL;
if ([event scrollingDeltaY] < 0) { if ([event scrollingDeltaY] < 0) {
flags |= PTR_FLAGS_WHEEL_NEGATIVE | 0x0088; flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
} }
else { else {
flags |= 0x0078; flags = PTR_FLAGS_WHEEL | 0x78;
} }
x += (int) [event scrollingDeltaX];
y += (int) [event scrollingDeltaY];
rdp_instance->input->MouseEvent(rdp_instance->input, flags, x, y); rdp_instance->input->MouseEvent(rdp_instance->input, flags, 0, 0);
} }
/** ********************************************************************* /** *********************************************************************
@ -629,6 +636,16 @@ extern struct kkey g_keys[];
g_mrdpRailView = self; g_mrdpRailView = self;
[self becomeFirstResponder]; [self becomeFirstResponder];
[self setAcceptsTouchEvents:YES];
// we want to be notified when window resizes....
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidResize:) name:NSWindowDidResizeNotification object:nil];
// ...moves
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidMove:) name:NSWindowDidMoveNotification object:nil];
// ...and becomes the key window
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification object:nil];
} }
- (void) setupBmiRep:(int) frameWidth :(int) frameHeight - (void) setupBmiRep:(int) frameWidth :(int) frameHeight
@ -657,6 +674,85 @@ extern struct kkey g_keys[];
bytesPerRow:frameWidth * sizeof(struct rgba_data) bytesPerRow:frameWidth * sizeof(struct rgba_data)
bitsPerPixel:0]; bitsPerPixel:0];
} }
- (void) beginGestureWithEvent:(NSEvent *)event
{
gestureEventInProgress = YES;
}
- (void) endGestureWithEvent:(NSEvent *)event
{
gestureEventInProgress = NO;
}
/**
* called when a bordered window changes size
*/
- (void) windowDidResize:(NSNotification *) notification
{
// if we are not the source of this notification, just return
if ([notification object] != [self mrdpRailWindow])
return;
// let RDP server know that window has moved
RAIL_WINDOW_MOVE_ORDER windowMove;
NSRect r = [[self window] frame];
int diffInHeight = [[self window] frame].size.height - [self frame].size.height;
r.size.height -= diffInHeight;
apple_to_windowMove(&r, &windowMove);
windowMove.windowId = self->savedWindowId;
mac_send_rail_client_event(self->context->channels, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &windowMove);
}
/**
* called when user moves a bordered window
*/
- (void) windowDidMove:(NSNotification *) notification
{
// if we are not the source of this notification, just return
if ([notification object] != [self mrdpRailWindow])
return;
// let RDP server know that window has moved
RAIL_WINDOW_MOVE_ORDER windowMove;
NSRect r = [[self window] frame];
int diffInHeight = [[self window] frame].size.height - [self frame].size.height;
r.size.height -= diffInHeight;
apple_to_windowMove(&r, &windowMove);
windowMove.windowId = self->savedWindowId;
mac_send_rail_client_event(self->context->channels, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &windowMove);
}
/**
* called when a NSWindow becomes the key window
*/
- (void) windowDidBecomeKey:(NSNotification *) notification
{
// if we are not the source of this notification, just return
if ([notification object] != [self mrdpRailWindow])
return;
if (![self activateWindow])
return;
[[self window] setAcceptsMouseMovedEvents: YES];
//if ([self activateWindow])
mac_rail_send_activate(savedWindowId);
set_current_window(windowIndex);
}
- (void) releaseResources
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
void rail_cvt_from_rect(char *dest, char *src, NSRect destRect, int destWidth, int destHeight, NSRect srcRect) void rail_cvt_from_rect(char *dest, char *src, NSRect destRect, int destWidth, int destHeight, NSRect srcRect)
{ {
@ -746,4 +842,16 @@ void rail_MoveWindow(rdpRail * rail, rdpWindow * window)
[[g_mrdpRailView window] setFrame:r display:YES]; [[g_mrdpRailView window] setFrame:r display:YES];
} }
void mac_rail_send_activate(int window_id)
{
RAIL_ACTIVATE_ORDER activate;
activate.windowId = window_id;
activate.enabled = 1;
mac_send_rail_client_event(g_mrdpRailView->context->channels, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate);
}
@end @end

View File

@ -34,8 +34,7 @@
#import "MRDPView.h" #import "MRDPView.h"
#import "MRDPCursor.h" #import "MRDPCursor.h"
// Should be defined in Makefile #define RUN_IN_XCODE
// #define RUN_IN_XCODE
// LK_TODO // LK_TODO
#define GOT_HERE //printf("### got here: %s : %s() : %d\n", __FILE__, __func__, __LINE__) #define GOT_HERE //printf("### got here: %s : %s() : %d\n", __FILE__, __func__, __LINE__)
@ -1870,6 +1869,7 @@ void cliprdr_send_supported_format_list(freerdp *inst)
freerdp_channels_send_event(inst->context->channels, (RDP_EVENT*) event); freerdp_channels_send_event(inst->context->channels, (RDP_EVENT*) event);
} }
<<<<<<< HEAD
/**************************************************************************************** /****************************************************************************************
* * * *
* * * *

View File

@ -8,4 +8,3 @@
@synthesize view; @synthesize view;
@end @end

View File

@ -1,3 +1,4 @@
option(WITH_MANPAGES "Generate manpages." ON) option(WITH_MANPAGES "Generate manpages." ON)
option(WITH_NEON "Enable NEON optimization for rfx decoder" OFF) option(WITH_NEON "Enable NEON optimization for rfx decoder" OFF)
option(WITH_PROFILER "Compile profiler." OFF) option(WITH_PROFILER "Compile profiler." OFF)
@ -5,6 +6,15 @@ option(WITH_SSE2_TARGET "Allow compiler to generate SSE2 instructions." OFF)
option(WITH_SSE2 "Use SSE2 optimization." OFF) option(WITH_SSE2 "Use SSE2 optimization." OFF)
option(WITH_JPEG "Use JPEG decoding." OFF) option(WITH_JPEG "Use JPEG decoding." OFF)
if(APPLE)
option(WITH_CLANG "Build using clang" OFF)
endif()
option(WITH_CLIENT "Build client binaries" ON)
option(WITH_SERVER "Build server binaries" OFF)
option(WITH_CHANNELS "Build virtual channel plugins" ON)
option(WITH_THIRD_PARTY "Build third-party components" OFF)
option(WITH_DEBUG_CERTIFICATE "Print certificate related debug messages." OFF) option(WITH_DEBUG_CERTIFICATE "Print certificate related debug messages." OFF)
option(WITH_DEBUG_CHANNELS "Print channel manager debug messages." OFF) option(WITH_DEBUG_CHANNELS "Print channel manager debug messages." OFF)
option(WITH_DEBUG_CLIPRDR "Print clipboard redirection debug messages" OFF) option(WITH_DEBUG_CLIPRDR "Print clipboard redirection debug messages" OFF)
@ -29,3 +39,4 @@ option(WITH_DEBUG_X11_CLIPRDR "Print X11 clipboard redirection debug messages" O
option(WITH_DEBUG_X11_LOCAL_MOVESIZE "Print X11 Client local movesize debug messages" OFF) option(WITH_DEBUG_X11_LOCAL_MOVESIZE "Print X11 Client local movesize debug messages" OFF)
option(WITH_DEBUG_X11 "Print X11 Client debug messages" OFF) option(WITH_DEBUG_X11 "Print X11 Client debug messages" OFF)
option(WITH_DEBUG_XV "Print XVideo debug messages" OFF) option(WITH_DEBUG_XV "Print XVideo debug messages" OFF)

View File

@ -0,0 +1,36 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* config.h definitions for installable headers
*
* Copyright 2012 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.
*/
#ifndef FREERDP_CONFIG_H
#define FREERDP_CONFIG_H
/*
* This generated config.h header is meant for installation, which is why
* all definitions MUST be prefixed to avoid conflicting with third-party
* libraries. Only add configurable definitions which really must be used
* from installable headers, such as the base type definition types.
*/
#cmakedefine FREERDP_HAVE_LIMITS_H
#cmakedefine FREERDP_HAVE_STDINT_H
#cmakedefine FREERDP_HAVE_STDBOOL_H
#cmakedefine FREERDP_HAVE_INTTYPES_H
#endif

View File

@ -18,25 +18,24 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef __RDP_TYPES_H #ifndef FREERDP_TYPES_H
#define __RDP_TYPES_H #define FREERDP_TYPES_H
#include <freerdp/config.h>
#ifdef _WIN32 #ifdef _WIN32
#include <windef.h> #include <windef.h>
#endif #endif
/* Base Types */ #ifdef FREERDP_HAVE_LIMITS_H
#include "config.h"
#ifdef HAVE_LIMITS_H
#include <limits.h> #include <limits.h>
#endif #endif
#ifdef HAVE_STDINT_H #ifdef FREERDP_HAVE_STDINT_H
#include <stdint.h> #include <stdint.h>
#endif #endif
#ifdef HAVE_INTTYPES_H #ifdef FREERDP_HAVE_INTTYPES_H
#include <inttypes.h> #include <inttypes.h>
typedef uint8_t uint8; typedef uint8_t uint8;
@ -66,7 +65,7 @@ typedef signed long long sint64;
#endif /* HAVE_INTTYPES_H */ #endif /* HAVE_INTTYPES_H */
#ifdef HAVE_STDBOOL_H #ifdef FREERDP_HAVE_STDBOOL_H
#include <stdbool.h> #include <stdbool.h>
@ -108,7 +107,7 @@ typedef int boolean;
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* HAVE_STDBOOL_H */ #endif /* FREERDP_HAVE_STDBOOL_H */
#ifndef MIN #ifndef MIN
#define MIN(x,y) (((x) < (y)) ? (x) : (y)) #define MIN(x,y) (((x) < (y)) ? (x) : (y))

2
third-party/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
**/**

31
third-party/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,31 @@
# Third-Party Extensions
#
# Copyright 2012 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.
# The third-party directory is meant for third-party components to be built
# as part of the main FreeRDP build system, making separate maintenance easier.
# Subdirectories of the third-party directory are ignored by git, but are
# automatically included by CMake when the -DWITH_THIRD_PARTY=on option is used.
file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
foreach(dir ${all_valid_subdirs})
message(STATUS "path = ${dir}")
if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
add_subdirectory(${dir_trimmed})
endif()
endforeach(dir)