2013-02-14 17:59:12 +04:00
|
|
|
# FreeRDP: A Remote Desktop Protocol Implementation
|
2013-03-29 17:28:27 +04:00
|
|
|
# FreeRDP X11 Client
|
2013-02-14 17:59:12 +04:00
|
|
|
#
|
|
|
|
# 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.
|
2023-12-21 19:24:43 +03:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
|
|
|
|
if (NOT FREERDP_DEFAULT_PROJECT_VERSION)
|
|
|
|
set(FREERDP_DEFAULT_PROJECT_VERSION "1.0.0.0")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
project(iFreeRDP
|
|
|
|
VERSION ${FREERDP_DEFAULT_PROJECT_VERSION}
|
|
|
|
)
|
|
|
|
|
|
|
|
message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}")
|
2013-02-14 17:59:12 +04:00
|
|
|
|
2023-11-07 17:41:01 +03:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_CURRENT_SOURCE_DIR}/../../cmake/)
|
2023-12-21 11:27:19 +03:00
|
|
|
include(CommonConfigOptions)
|
2023-11-07 17:41:01 +03:00
|
|
|
|
2013-03-29 17:28:27 +04:00
|
|
|
set(MODULE_NAME "iFreeRDP")
|
|
|
|
set(MODULE_PREFIX "IFREERDP_CLIENT")
|
|
|
|
set(APP_TYPE MACOSX_BUNDLE)
|
|
|
|
|
|
|
|
set(IOS_CLIENT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
set(IOS_CLIENT_ADDITIONS_DIR ${IOS_CLIENT_DIR}/Additions)
|
|
|
|
set(IOS_CLIENT_CONTROLLERS_DIR ${IOS_CLIENT_DIR}/Controllers)
|
|
|
|
set(IOS_CLIENT_FREERDP_DIR ${IOS_CLIENT_DIR}/FreeRDP)
|
|
|
|
set(IOS_CLIENT_MISC_DIR ${IOS_CLIENT_DIR}/Misc)
|
|
|
|
set(IOS_CLIENT_MODELS_DIR ${IOS_CLIENT_DIR}/Models)
|
|
|
|
set(IOS_CLIENT_VIEWS_DIR ${IOS_CLIENT_DIR}/Views)
|
|
|
|
set(IOS_CLIENT_RESOURCES_DIR ${IOS_CLIENT_DIR}/Resources)
|
|
|
|
|
|
|
|
include_directories(${IOS_CLIENT_DIR})
|
|
|
|
include_directories(${IOS_CLIENT_ADDITIONS_DIR})
|
|
|
|
include_directories(${IOS_CLIENT_CONTROLLERS_DIR})
|
|
|
|
include_directories(${IOS_CLIENT_FREERDP_DIR})
|
|
|
|
include_directories(${IOS_CLIENT_MISC_DIR})
|
|
|
|
include_directories(${IOS_CLIENT_MODELS_DIR})
|
|
|
|
include_directories(${IOS_CLIENT_VIEWS_DIR})
|
|
|
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
|
|
|
|
|
|
|
# Add sources
|
|
|
|
set(${MODULE_PREFIX}_SRCS
|
|
|
|
AppDelegate.m
|
|
|
|
AppDelegate.h
|
|
|
|
main.m)
|
|
|
|
|
|
|
|
file(GLOB IOS_CLIENT_ADDITIONS_SRCS ${IOS_CLIENT_ADDITIONS_DIR}/*.m)
|
|
|
|
file(GLOB IOS_CLIENT_ADDITIONS_HDRS ${IOS_CLIENT_ADDITIONS_DIR}/*.h)
|
|
|
|
|
|
|
|
file(GLOB IOS_CLIENT_CONTROLLERS_SRCS ${IOS_CLIENT_CONTROLLERS_DIR}/*.m)
|
|
|
|
file(GLOB IOS_CLIENT_CONTROLLERS_HDRS ${IOS_CLIENT_CONTROLLERS_DIR}/*.h)
|
|
|
|
|
|
|
|
file(GLOB IOS_CLIENT_FREERDP_SRCS ${IOS_CLIENT_FREERDP_DIR}/*.m)
|
|
|
|
file(GLOB IOS_CLIENT_FREERDP_HDRS ${IOS_CLIENT_FREERDP_DIR}/*.h)
|
|
|
|
|
|
|
|
file(GLOB IOS_CLIENT_MISC_SRCS ${IOS_CLIENT_MISC_DIR}/*.m)
|
|
|
|
file(GLOB IOS_CLIENT_MISC_HDRS ${IOS_CLIENT_MISC_DIR}/*.h)
|
|
|
|
|
|
|
|
file(GLOB IOS_CLIENT_MODELS_SRCS ${IOS_CLIENT_MODELS_DIR}/*.m)
|
|
|
|
file(GLOB IOS_CLIENT_MODELS_HDRS ${IOS_CLIENT_MODELS_DIR}/*.h)
|
|
|
|
|
|
|
|
file(GLOB IOS_CLIENT_VIEWS_SRCS ${IOS_CLIENT_VIEWS_DIR}/*.m)
|
|
|
|
file(GLOB IOS_CLIENT_VIEWS_HDRS ${IOS_CLIENT_VIEWS_DIR}/*.h)
|
|
|
|
|
|
|
|
# add resources
|
|
|
|
file(GLOB IOS_CLIENT_RESOURCES_XIBS ${IOS_CLIENT_RESOURCES_DIR}/*.xib)
|
|
|
|
file(GLOB IOS_CLIENT_RESOURCES_PNGS ${IOS_CLIENT_RESOURCES_DIR}/*.png)
|
|
|
|
|
|
|
|
# Specify source grouping
|
|
|
|
source_group(Additions FILES ${IOS_CLIENT_ADDITIONS_SRCS} ${IOS_CLIENT_ADDITIONS_HDRS})
|
|
|
|
source_group(Controllers FILES ${IOS_CLIENT_CONTROLLERS_SRCS} ${IOS_CLIENT_CONTROLLERS_HDRS})
|
|
|
|
source_group(FreeRDP FILES ${IOS_CLIENT_FREERDP_SRCS} ${IOS_CLIENT_FREERDP_HDRS})
|
|
|
|
source_group(Misc FILES ${IOS_CLIENT_MISC_SRCS} ${IOS_CLIENT_MISC_HDRS})
|
|
|
|
source_group(Models FILES ${IOS_CLIENT_MODELS_SRCS} ${IOS_CLIENT_MODELS_HDRS})
|
|
|
|
source_group(Views FILES ${IOS_CLIENT_RESOURCES_XIBS} ${IOS_CLIENT_VIEWS_SRCS} ${IOS_CLIENT_VIEWS_HDRS})
|
|
|
|
source_group(Resources FILES ${IOS_CLIENT_RESOURCES_PNGS} ${IOS_CLIENT_RESOURCES_DIR}/about_page ${IOS_CLIENT_RESOURCES_DIR}/help_page ${IOS_CLIENT_RESOURCES_DIR}/en.lproj)
|
|
|
|
|
|
|
|
# import libraries
|
|
|
|
find_library(FOUNDATION_FRAMEWORK Foundation)
|
|
|
|
find_library(COREGRAPHICS_FRAMEWORK CoreGraphics)
|
|
|
|
find_library(SECURITY_FRAMEWORK Security)
|
|
|
|
find_library(UIKIT_FRAMEWORK UIKit)
|
|
|
|
find_library(SYSTEMCONFIGURATION_FRAMEWORK SystemConfiguration)
|
|
|
|
|
|
|
|
mark_as_advanced(FOUNDATION_FRAMEWORK COREGRAPHICS_FRAMEWORK SECURITY_FRAMEWORK UIKIT_FRAMEWORK SYSTEMCONFIGURATION_FRAMEWORK)
|
|
|
|
set(EXTRA_LIBS ${FOUNDATION_FRAMEWORK} ${COREGRAPHICS_FRAMEWORK} ${SECURITY_FRAMEWORK} ${UIKIT_FRAMEWORK} ${SYSTEMCONFIGURATION_FRAMEWORK})
|
|
|
|
|
|
|
|
set(${MODULE_NAME}_RESOURCES ${IOS_CLIENT_RESOURCES_XIBS})
|
|
|
|
set(${MODULE_NAME}_RESOURCES ${${MODULE_NAME}_RESOURCES} ${IOS_CLIENT_RESOURCES_PNGS})
|
|
|
|
set(${MODULE_NAME}_RESOURCES ${${MODULE_NAME}_RESOURCES} ${IOS_CLIENT_RESOURCES_DIR}/about_page ${IOS_CLIENT_RESOURCES_DIR}/help_page ${IOS_CLIENT_RESOURCES_DIR}/en.lproj)
|
|
|
|
set(${MODULE_NAME}_RESOURCES ${${MODULE_NAME}_RESOURCES} ${IOS_CLIENT_DIR}/Defaults.plist)
|
|
|
|
|
|
|
|
add_executable(${MODULE_NAME}
|
|
|
|
${APP_TYPE}
|
|
|
|
${${MODULE_PREFIX}_SRCS}
|
2013-10-06 00:00:37 +04:00
|
|
|
${IOS_CLIENT_ADDITIONS_SRCS} ${IOS_CLIENT_ADDITIONS_HDRS}
|
2013-03-29 17:28:27 +04:00
|
|
|
${IOS_CLIENT_CONTROLLERS_SRCS} ${IOS_CLIENT_CONTROLLERS_HDRS}
|
|
|
|
${IOS_CLIENT_FREERDP_SRCS} ${IOS_CLIENT_FREERDP_HDRS}
|
|
|
|
${IOS_CLIENT_MISC_SRCS} ${IOS_CLIENT_MISC_HDRS}
|
|
|
|
${IOS_CLIENT_MODELS_SRCS} ${IOS_CLIENT_MODELS_HDRS}
|
|
|
|
${IOS_CLIENT_VIEWS_SRCS} ${IOS_CLIENT_VIEWS_HDRS}
|
|
|
|
${${MODULE_NAME}_RESOURCES}
|
2013-02-14 17:59:12 +04:00
|
|
|
)
|
2013-03-29 17:28:27 +04:00
|
|
|
|
2023-12-21 19:27:54 +03:00
|
|
|
if (WITH_BINARY_VERSIONING)
|
2023-12-22 14:51:30 +03:00
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "${MODULE_NAME}${PROJECT_VERSION_MAJOR}")
|
2023-12-21 19:27:54 +03:00
|
|
|
endif()
|
2013-03-29 17:28:27 +04:00
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES RESOURCE "${${MODULE_NAME}_RESOURCES}")
|
|
|
|
|
|
|
|
set(EXECUTABLE_NAME "\${EXECUTABLE_NAME}")
|
|
|
|
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${IOS_CLIENT_DIR}/iFreeRDP.plist)
|
2016-08-10 12:06:34 +03:00
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "${IOS_TARGET_SDK}")
|
2013-03-29 17:28:27 +04:00
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++0x")
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC NO)
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD "gnu99")
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_COMBINE_HIDPI_IMAGES "NO")
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_SKIP_INSTALL NO)
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_INSTALL_PATH "/Applications")
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS YES)
|
2013-10-06 00:00:37 +04:00
|
|
|
if (CODE_SIGN_IDENTITY)
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${CODE_SIGN_IDENTITY}")
|
|
|
|
endif()
|
2013-03-29 17:28:27 +04:00
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${EXTRA_LIBS})
|
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
|
|
|
|
2014-09-12 02:19:53 +04:00
|
|
|
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
|
2013-03-29 17:28:27 +04:00
|
|
|
|
|
|
|
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/iOS")
|