mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 11:54:44 +08:00
macfreerdp: fix build
This commit is contained in:
parent
2f1711c506
commit
6bc686e7a9
@ -1,104 +1,56 @@
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
project (MacFreeRDP)
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
project(MacFreeRDP)
|
||||
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckStructHasMember)
|
||||
include(FindPkgConfig)
|
||||
include(TestBigEndian)
|
||||
set(MODULE_NAME "MacFreeRDP")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_MAC")
|
||||
|
||||
include(AutoVersioning)
|
||||
include(ConfigOptions)
|
||||
include(FindOptionalPackage)
|
||||
include(CheckCCompilerFlag)
|
||||
include(GNUInstallDirsWrapper)
|
||||
find_required_package(OpenSSL)
|
||||
|
||||
# Default to debug build type
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
endif()
|
||||
|
||||
# Default to build shared libs
|
||||
if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
# Compiler-specific flags
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
endif()
|
||||
if(WITH_SSE2_TARGET)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Libraries that we have a hard dependency on
|
||||
if(NOT DEFINED OPENSSL_INCLUDE_DIR OR NOT DEFINED OPENSSL_LIBRARIES)
|
||||
find_required_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
# Mac OS X
|
||||
if(APPLE)
|
||||
# Set the include files for FreeRDP to the relative path
|
||||
set(FREERDP_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/../../include/)
|
||||
set(FRAMEWORK_HEADERS_PATH /System/Library/Frameworks/Cocoa.framework/Versions/A/Headers/)
|
||||
include_directories (${FREERDP_INCLUDE_PATH} ${FRAMEWORK_HEADERS_PATH} /System/Library/Frameworks)
|
||||
set(FRAMEWORK_HEADERS_PATH /System/Library/Frameworks/Cocoa.framework/Versions/A/Headers/)
|
||||
include_directories(${FRAMEWORK_HEADERS_PATH} /System/Library/Frameworks)
|
||||
|
||||
# set(CMAKE_OSX_SYSROOT MacOSX10.7.sdk) # uncomment to specify SDK version
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mmacosx-version-min=10.4")
|
||||
set(GUI_TYPE MACOSX_BUNDLE)
|
||||
# set(CMAKE_OSX_SYSROOT MacOSX10.7.sdk) # uncomment to specify SDK version
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mmacosx-version-min=10.4")
|
||||
set(GUI_TYPE MACOSX_BUNDLE)
|
||||
|
||||
# Import libraries
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
message("+ Using foundation library ${FOUNDATION_LIBRARY}")
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
message("+ Using cocoa library ${COCOA_LIBRARY}")
|
||||
find_library(APPKIT_LIBRARY AppKit)
|
||||
message("+ Using appkit library ${APPKIT_LIBRARY}")
|
||||
# Import libraries
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
message("+ Using foundation library ${FOUNDATION_LIBRARY}")
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
message("+ Using cocoa library ${COCOA_LIBRARY}")
|
||||
find_library(APPKIT_LIBRARY AppKit)
|
||||
message("+ Using appkit library ${APPKIT_LIBRARY}")
|
||||
|
||||
message(" Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
# Set the OS X Bundle specific CMake variables which will be used to populate the plist for
|
||||
# the application bundle
|
||||
set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
||||
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP.Mac")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME} Version 1.0.1")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME})
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.0.1)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.0.1)
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2012. All Rights Reserved.")
|
||||
message(" Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
# Set the OS X Bundle specific CMake variables which will be used to populate the plist for
|
||||
# the application bundle
|
||||
set(MACOSX_BUNDLE_INFO_STRING "MacFreeRDP")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
||||
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP.Mac")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "MacFreeRDP Version 1.0.1")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "MacFreeRDP")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.0.1)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.0.1)
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2012. All Rights Reserved.")
|
||||
|
||||
# Specific plist and NOT standard CMake variables
|
||||
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
|
||||
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
|
||||
# Specific plist and NOT standard CMake variables
|
||||
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
|
||||
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
|
||||
|
||||
mark_as_advanced(COCOA_LIBRARY
|
||||
FOUNDATION_LIBRARY
|
||||
APPKIT_LIBRARY)
|
||||
set(EXTRA_LIBS ${COCOA_LIBRARY} ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY})
|
||||
set(APP_TYPE MACOSX_BUNDLE)
|
||||
endif()
|
||||
mark_as_advanced(COCOA_LIBRARY FOUNDATION_LIBRARY APPKIT_LIBRARY)
|
||||
set(EXTRA_LIBS ${COCOA_LIBRARY} ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY})
|
||||
set(APP_TYPE MACOSX_BUNDLE)
|
||||
|
||||
# OS X Interface Builder files
|
||||
file (GLOB MacFreeRDP_XIBS
|
||||
*.xib
|
||||
)
|
||||
file(GLOB MacFreeRDP_XIBS *.xib)
|
||||
|
||||
# Headers
|
||||
file (GLOB MacFreeRDP_Headers
|
||||
*.h
|
||||
)
|
||||
file(GLOB MacFreeRDP_Headers *.h)
|
||||
|
||||
# Source
|
||||
file (GLOB MacFreeRDP_Source
|
||||
*.m
|
||||
)
|
||||
file(GLOB MacFreeRDP_Source *.m)
|
||||
|
||||
add_executable(MacFreeRDP
|
||||
add_executable(MacFreeRDP
|
||||
${APP_TYPE}
|
||||
${MacFreeRDP_Headers}
|
||||
${MacFreeRDP_Source}
|
||||
@ -129,17 +81,16 @@ set_target_properties(MacFreeRDP PROPERTIES XCODE_ATTRIBUTE_ARCHS "$(NATIVE_ARCH
|
||||
# Set the info plist to the custom instance
|
||||
set_target_properties(MacFreeRDP PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_optional_package(MacAudio)
|
||||
endif()
|
||||
find_optional_package(MacAudio)
|
||||
|
||||
target_link_libraries(MacFreeRDP
|
||||
${EXTRA_LIBS}
|
||||
freerdp-core
|
||||
freerdp-cache
|
||||
freerdp-gdi
|
||||
freerdp-utils
|
||||
freerdp-codec
|
||||
freerdp-rail)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${EXTRA_LIBS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-core freerdp-cache freerdp-gdi freerdp-codec freerdp-rail freerdp-utils)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET MacFreeRDP PROPERTY FOLDER "Client/Mac")
|
||||
|
@ -1021,7 +1021,6 @@ BOOL mac_pre_connect(freerdp *inst)
|
||||
int i;
|
||||
|
||||
inst->settings->offscreen_bitmap_cache = FALSE;
|
||||
inst->settings->glyph_cache = TRUE;
|
||||
inst->settings->glyphSupportLevel = GLYPH_SUPPORT_FULL;
|
||||
inst->settings->order_support[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
||||
inst->settings->order_support[NEG_FAST_GLYPH_INDEX] = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user