2019-05-17 20:32:54 +08:00
|
|
|
# FreeRDP: A Remote Desktop Protocol Implementation
|
|
|
|
# FreeRDP Proxy Server
|
|
|
|
#
|
|
|
|
# Copyright 2019 Mati Shabtay <matishabtay@gmail.com>
|
|
|
|
# Copyright 2019 Kobi Mizrachi <kmizrachi18@gmail.com>
|
2019-08-19 21:05:59 +08:00
|
|
|
# Copyright 2019 Idan Freiberg <speidy@gmail.com>
|
2021-09-01 19:30:09 +08:00
|
|
|
# Copyright 2021 Armin Novak <anovak@thincast.com>
|
|
|
|
# Copyright 2021 Thincast Technologies GmbH
|
|
|
|
#
|
2019-05-17 20:32:54 +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.
|
|
|
|
|
2020-03-09 16:14:50 +08:00
|
|
|
include(CMakeDependentOption)
|
2021-08-24 18:50:13 +08:00
|
|
|
set(MODULE_NAME "freerdp-server-proxy")
|
2019-05-17 20:32:54 +08:00
|
|
|
set(MODULE_PREFIX "FREERDP_SERVER_PROXY")
|
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_SRCS
|
|
|
|
pf_context.c
|
2022-03-07 20:46:49 +08:00
|
|
|
pf_channel.c
|
|
|
|
pf_channel.h
|
2019-05-17 20:32:54 +08:00
|
|
|
pf_client.c
|
|
|
|
pf_client.h
|
|
|
|
pf_input.c
|
|
|
|
pf_input.h
|
|
|
|
pf_update.c
|
|
|
|
pf_update.h
|
|
|
|
pf_server.c
|
|
|
|
pf_server.h
|
|
|
|
pf_config.c
|
2019-08-19 21:05:59 +08:00
|
|
|
pf_modules.c
|
2021-08-24 18:50:13 +08:00
|
|
|
pf_utils.h
|
|
|
|
pf_utils.c
|
2023-05-11 20:15:53 +08:00
|
|
|
$<TARGET_OBJECTS:pf_channels>
|
2019-08-19 21:05:59 +08:00
|
|
|
)
|
2019-05-17 20:32:54 +08:00
|
|
|
|
2021-08-24 18:50:13 +08:00
|
|
|
set(PROXY_APP_SRCS freerdp_proxy.c)
|
|
|
|
|
2022-01-20 18:12:36 +08:00
|
|
|
option(WITH_PROXY_EMULATE_SMARTCARD "Compile proxy smartcard emulation" OFF)
|
2021-12-14 20:02:29 +08:00
|
|
|
add_subdirectory("channels")
|
|
|
|
|
2024-03-19 19:19:07 +08:00
|
|
|
AddTargetWithResourceFile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" ${MODULE_PREFIX}_SRCS)
|
2019-05-17 20:32:54 +08:00
|
|
|
|
2023-03-10 18:14:21 +08:00
|
|
|
set(PRIVATE_LIBS
|
2023-02-20 21:00:41 +08:00
|
|
|
freerdp-client
|
|
|
|
freerdp-server
|
|
|
|
)
|
2019-05-17 20:32:54 +08:00
|
|
|
|
2023-03-10 18:14:21 +08:00
|
|
|
set(PUBLIC_LIBS
|
|
|
|
winpr
|
|
|
|
freerdp
|
|
|
|
)
|
|
|
|
|
2023-08-01 15:07:39 +08:00
|
|
|
target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
2023-03-10 18:14:21 +08:00
|
|
|
target_link_libraries(${MODULE_NAME} PRIVATE ${PRIVATE_LIBS} PUBLIC ${PUBLIC_LIBS})
|
2023-10-20 18:56:49 +08:00
|
|
|
|
|
|
|
install(TARGETS ${MODULE_NAME} COMPONENT server EXPORT FreeRDP-ProxyTargets
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Proxy")
|
|
|
|
|
2021-08-24 18:50:13 +08:00
|
|
|
# pkg-config
|
2023-10-09 16:00:58 +08:00
|
|
|
include(pkg-config-install-prefix)
|
2024-10-03 04:37:35 +08:00
|
|
|
cleaning_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp-proxy.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}${FREERDP_VERSION_MAJOR}.pc @ONLY)
|
2024-01-03 02:51:33 +08:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}${FREERDP_VERSION_MAJOR}.pc DESTINATION ${PKG_CONFIG_PC_INSTALL_DIR})
|
2021-08-24 18:50:13 +08:00
|
|
|
|
|
|
|
export(PACKAGE freerdp-proxy)
|
|
|
|
|
|
|
|
SetFreeRDPCMakeInstallDir(FREERDP_PROXY_CMAKE_INSTALL_DIR "FreeRDP-Proxy${FREERDP_VERSION_MAJOR}")
|
|
|
|
|
|
|
|
configure_package_config_file(FreeRDP-ProxyConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfig.cmake
|
|
|
|
INSTALL_DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR}
|
|
|
|
PATH_VARS FREERDP_INCLUDE_DIR)
|
|
|
|
|
|
|
|
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfigVersion.cmake
|
|
|
|
VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion)
|
|
|
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfigVersion.cmake
|
|
|
|
DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR})
|
2023-05-11 20:15:53 +08:00
|
|
|
install(EXPORT FreeRDP-ProxyTargets DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR})
|
2019-05-17 20:32:54 +08:00
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/proxy")
|
2019-05-26 20:29:41 +08:00
|
|
|
|
2021-08-24 18:50:13 +08:00
|
|
|
option(WITH_PROXY_APP "Compile proxy application" ON)
|
|
|
|
|
|
|
|
if (WITH_PROXY_APP)
|
|
|
|
add_subdirectory("cli")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
option(WITH_PROXY_MODULES "Compile proxy modules" ON)
|
2020-01-13 18:30:09 +08:00
|
|
|
if (WITH_PROXY_MODULES)
|
|
|
|
add_subdirectory("modules")
|
|
|
|
endif()
|
2021-12-14 20:02:29 +08:00
|
|
|
|