2019-05-17 15:32:54 +03: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 16:05:59 +03:00
|
|
|
# Copyright 2019 Idan Freiberg <speidy@gmail.com>
|
2021-09-01 14:30:09 +03:00
|
|
|
# Copyright 2021 Armin Novak <anovak@thincast.com>
|
|
|
|
# Copyright 2021 Thincast Technologies GmbH
|
|
|
|
#
|
2019-05-17 15:32:54 +03: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 11:14:50 +03:00
|
|
|
include(CMakeDependentOption)
|
2021-08-24 13:50:13 +03:00
|
|
|
set(MODULE_NAME "freerdp-server-proxy")
|
2019-05-17 15:32:54 +03:00
|
|
|
set(MODULE_PREFIX "FREERDP_SERVER_PROXY")
|
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_SRCS
|
|
|
|
pf_context.c
|
2022-03-07 15:46:49 +03:00
|
|
|
pf_channel.c
|
|
|
|
pf_channel.h
|
2019-05-17 15:32:54 +03: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 16:05:59 +03:00
|
|
|
pf_modules.c
|
2021-08-24 13:50:13 +03:00
|
|
|
pf_utils.h
|
|
|
|
pf_utils.c
|
2023-05-11 15:15:53 +03:00
|
|
|
$<TARGET_OBJECTS:pf_channels>
|
2019-08-19 16:05:59 +03:00
|
|
|
)
|
2019-05-17 15:32:54 +03:00
|
|
|
|
2021-08-24 13:50:13 +03:00
|
|
|
set(PROXY_APP_SRCS freerdp_proxy.c)
|
|
|
|
|
2022-01-20 13:12:36 +03:00
|
|
|
option(WITH_PROXY_EMULATE_SMARTCARD "Compile proxy smartcard emulation" OFF)
|
2021-12-14 15:02:29 +03:00
|
|
|
add_subdirectory("channels")
|
|
|
|
|
2024-03-19 14:19:07 +03:00
|
|
|
AddTargetWithResourceFile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" ${MODULE_PREFIX}_SRCS)
|
2019-05-17 15:32:54 +03:00
|
|
|
|
2023-03-10 13:14:21 +03:00
|
|
|
set(PRIVATE_LIBS
|
2023-02-20 16:00:41 +03:00
|
|
|
freerdp-client
|
|
|
|
freerdp-server
|
|
|
|
)
|
2019-05-17 15:32:54 +03:00
|
|
|
|
2023-03-10 13:14:21 +03:00
|
|
|
set(PUBLIC_LIBS
|
|
|
|
winpr
|
|
|
|
freerdp
|
|
|
|
)
|
|
|
|
|
2023-08-01 10:07:39 +03:00
|
|
|
target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
2023-03-10 13:14:21 +03:00
|
|
|
target_link_libraries(${MODULE_NAME} PRIVATE ${PRIVATE_LIBS} PUBLIC ${PUBLIC_LIBS})
|
2023-10-20 13:56:49 +03: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 13:50:13 +03:00
|
|
|
# pkg-config
|
2023-10-09 11:00:58 +03:00
|
|
|
include(pkg-config-install-prefix)
|
2024-10-02 23:37:35 +03: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-02 21:51:33 +03:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}${FREERDP_VERSION_MAJOR}.pc DESTINATION ${PKG_CONFIG_PC_INSTALL_DIR})
|
2021-08-24 13:50:13 +03: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 15:15:53 +03:00
|
|
|
install(EXPORT FreeRDP-ProxyTargets DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR})
|
2019-05-17 15:32:54 +03:00
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/proxy")
|
2019-05-26 15:29:41 +03:00
|
|
|
|
2021-08-24 13:50:13 +03: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 13:30:09 +03:00
|
|
|
if (WITH_PROXY_MODULES)
|
|
|
|
add_subdirectory("modules")
|
|
|
|
endif()
|
2021-12-14 15:02:29 +03:00
|
|
|
|