2014-07-11 00:32:46 +04:00
|
|
|
# FreeRDP: A Remote Desktop Protocol Implementation
|
|
|
|
# FreeRDP Shadow Server cmake build script
|
|
|
|
#
|
|
|
|
# Copyright 2014 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.
|
|
|
|
|
2016-02-29 18:02:13 +03:00
|
|
|
# freerdp-shadow library
|
|
|
|
|
2014-07-11 00:32:46 +04:00
|
|
|
set(MODULE_NAME "freerdp-shadow")
|
|
|
|
set(MODULE_PREFIX "FREERDP_SERVER_SHADOW")
|
|
|
|
|
2015-06-28 11:20:49 +03:00
|
|
|
set(${MODULE_PREFIX}_SRCS
|
|
|
|
shadow_client.c
|
|
|
|
shadow_client.h
|
|
|
|
shadow_lobby.c
|
|
|
|
shadow_lobby.h
|
|
|
|
shadow_input.c
|
|
|
|
shadow_input.h
|
|
|
|
shadow_screen.c
|
|
|
|
shadow_screen.h
|
|
|
|
shadow_surface.c
|
|
|
|
shadow_surface.h
|
|
|
|
shadow_encoder.c
|
|
|
|
shadow_encoder.h
|
|
|
|
shadow_capture.c
|
|
|
|
shadow_capture.h
|
|
|
|
shadow_channels.c
|
|
|
|
shadow_channels.h
|
|
|
|
shadow_encomsp.c
|
|
|
|
shadow_encomsp.h
|
|
|
|
shadow_remdesk.c
|
|
|
|
shadow_remdesk.h
|
|
|
|
shadow_rdpsnd.c
|
|
|
|
shadow_rdpsnd.h
|
|
|
|
shadow_audin.c
|
|
|
|
shadow_audin.h
|
2016-04-23 20:49:10 +03:00
|
|
|
shadow_rdpgfx.c
|
|
|
|
shadow_rdpgfx.h
|
2015-06-28 11:20:49 +03:00
|
|
|
shadow_subsystem.c
|
|
|
|
shadow_subsystem.h
|
|
|
|
shadow_mcevent.c
|
|
|
|
shadow_mcevent.h
|
|
|
|
shadow_server.c
|
|
|
|
shadow.h)
|
|
|
|
|
|
|
|
# On windows create dll version information.
|
|
|
|
# Vendor, product and year are already set in top level CMakeLists.txt
|
|
|
|
if (WIN32)
|
|
|
|
set (RC_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
|
|
|
|
set (RC_VERSION_MINOR ${FREERDP_VERSION_MINOR})
|
|
|
|
set (RC_VERSION_BUILD ${FREERDP_VERSION_REVISION})
|
|
|
|
set (RC_VERSION_PATCH 0)
|
|
|
|
set (RC_VERSION_FILE "${CMAKE_SHARED_LIBRARY_PREFIX}${MODULE_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" )
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_SOURCE_DIR}/cmake/WindowsDLLVersion.rc.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/version.rc
|
|
|
|
@ONLY)
|
|
|
|
|
|
|
|
set ( ${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
|
|
|
|
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS freerdp)
|
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS freerdp-server)
|
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS winpr)
|
2016-05-03 15:16:11 +03:00
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS winpr-tools)
|
2015-06-28 11:20:49 +03:00
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS rdtk)
|
|
|
|
|
2016-03-25 18:28:17 +03:00
|
|
|
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
2015-06-28 11:20:49 +03:00
|
|
|
|
2016-12-21 17:25:03 +03:00
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_VERSION_MAJOR})
|
2015-06-28 11:20:49 +03:00
|
|
|
if (WITH_LIBRARY_VERSIONING)
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
|
|
|
endif()
|
|
|
|
|
2016-02-29 18:22:24 +03:00
|
|
|
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server EXPORT FreeRDP-ShadowTargets)
|
2015-06-28 11:20:49 +03:00
|
|
|
|
|
|
|
if (WITH_DEBUG_SYMBOLS AND MSVC)
|
2017-01-31 15:32:51 +03:00
|
|
|
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
|
2015-06-28 11:20:49 +03:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/shadow")
|
|
|
|
|
2016-02-23 12:49:52 +03:00
|
|
|
# subsystem library
|
2015-06-28 11:20:49 +03:00
|
|
|
|
2016-02-23 12:49:52 +03:00
|
|
|
set(MODULE_NAME "freerdp-shadow-subsystem")
|
|
|
|
set(MODULE_PREFIX "FREERDP_SERVER_SHADOW_SUBSYSTEM")
|
2015-06-28 11:20:49 +03:00
|
|
|
|
2016-02-26 20:07:30 +03:00
|
|
|
set(${MODULE_PREFIX}_SRCS
|
|
|
|
shadow_subsystem_builtin.c)
|
|
|
|
|
2014-09-13 21:12:55 +04:00
|
|
|
if(WIN32)
|
|
|
|
set(WITH_SHADOW_WIN 1)
|
|
|
|
elseif(X11_FOUND AND NOT APPLE)
|
|
|
|
set(WITH_SHADOW_X11 1)
|
|
|
|
elseif(APPLE AND NOT IOS)
|
|
|
|
set(WITH_SHADOW_MAC 1)
|
|
|
|
endif()
|
|
|
|
|
2016-02-29 18:02:13 +03:00
|
|
|
if (WIN32)
|
|
|
|
set (RC_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
|
|
|
|
set (RC_VERSION_MINOR ${FREERDP_VERSION_MINOR})
|
|
|
|
set (RC_VERSION_BUILD ${FREERDP_VERSION_REVISION})
|
|
|
|
set (RC_VERSION_FILE "${MODULE_NAME}${CMAKE_EXECUTABLE_SUFFIX}" )
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_SOURCE_DIR}/cmake/WindowsDLLVersion.rc.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/version.rc
|
|
|
|
@ONLY)
|
|
|
|
|
|
|
|
set ( ${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
|
|
|
|
endif()
|
|
|
|
|
2014-09-27 03:03:48 +04:00
|
|
|
# Authentication
|
|
|
|
|
|
|
|
if(WITH_SHADOW_X11 OR WITH_SHADOW_MAC)
|
|
|
|
set(PAM_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(PAM_FEATURE_PURPOSE "authentication")
|
|
|
|
set(PAM_FEATURE_DESCRIPTION "user authentication")
|
|
|
|
|
|
|
|
find_feature(PAM ${PAM_FEATURE_TYPE} ${PAM_FEATURE_PURPOSE} ${PAM_FEATURE_DESCRIPTION})
|
|
|
|
|
|
|
|
if(PAM_FOUND)
|
|
|
|
add_definitions(-DWITH_PAM)
|
|
|
|
include_directories(${PAM_INCLUDE_DIR})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_AUTH_LIBS ${PAM_LIBRARY})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2014-09-13 21:12:55 +04:00
|
|
|
if(WITH_SHADOW_X11)
|
2014-07-11 00:32:46 +04:00
|
|
|
set(XEXT_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XEXT_FEATURE_PURPOSE "X11 extension")
|
|
|
|
set(XEXT_FEATURE_DESCRIPTION "X11 core extensions")
|
|
|
|
|
|
|
|
set(XSHM_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XSHM_FEATURE_PURPOSE "X11 shared memory")
|
|
|
|
set(XSHM_FEATURE_DESCRIPTION "X11 shared memory extension")
|
|
|
|
|
|
|
|
set(XINERAMA_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XINERAMA_FEATURE_PURPOSE "multi-monitor")
|
|
|
|
set(XINERAMA_FEATURE_DESCRIPTION "X11 multi-monitor extension")
|
|
|
|
|
|
|
|
set(XTEST_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XTEST_FEATURE_PURPOSE "X11 input event injection")
|
|
|
|
set(XTEST_FEATURE_DESCRIPTION "X11 input event injection extension")
|
|
|
|
|
|
|
|
set(XCURSOR_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XCURSOR_FEATURE_PURPOSE "cursor")
|
|
|
|
set(XCURSOR_FEATURE_DESCRIPTION "X11 cursor extension")
|
|
|
|
|
|
|
|
set(XFIXES_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XFIXES_FEATURE_PURPOSE "X11 region")
|
|
|
|
set(XFIXES_FEATURE_DESCRIPTION "X11 region fix extension")
|
|
|
|
|
|
|
|
set(XRANDR_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XRANDR_FEATURE_PURPOSE "X11 resize, rotate and reflect")
|
|
|
|
set(XRANDR_FEATURE_DESCRIPTION "X11 resize, rotate and reflect extension")
|
|
|
|
|
|
|
|
set(XDAMAGE_FEATURE_TYPE "RECOMMENDED")
|
|
|
|
set(XDAMAGE_FEATURE_PURPOSE "X11 region damage")
|
|
|
|
set(XDAMAGE_FEATURE_DESCRIPTION "X11 region damage extension")
|
|
|
|
|
|
|
|
find_feature(Xext ${XEXT_FEATURE_TYPE} ${XEXT_FEATURE_PURPOSE} ${XEXT_FEATURE_DESCRIPTION})
|
|
|
|
find_feature(XShm ${XSHM_FEATURE_TYPE} ${XSHM_FEATURE_PURPOSE} ${XSHM_FEATURE_DESCRIPTION})
|
|
|
|
find_feature(XTest ${XTEST_FEATURE_TYPE} ${XTEST_FEATURE_PURPOSE} ${XTEST_FEATURE_DESCRIPTION})
|
|
|
|
find_feature(Xfixes ${XFIXES_FEATURE_TYPE} ${XFIXES_FEATURE_PURPOSE} ${XFIXES_FEATURE_DESCRIPTION})
|
|
|
|
find_feature(Xdamage ${XDAMAGE_FEATURE_TYPE} ${XDAMAGE_FEATURE_PURPOSE} ${XDAMAGE_FEATURE_DESCRIPTION})
|
|
|
|
find_feature(Xinerama ${XINERAMA_FEATURE_TYPE} ${XINERAMA_FEATURE_PURPOSE} ${XINERAMA_FEATURE_DESCRIPTION})
|
2016-03-25 18:28:17 +03:00
|
|
|
find_feature(XRandR ${XRANDR_FEATURE_TYPE} ${XRANDR_FEATURE_PURPOSE} ${XRANDR_FEATURE_DESCRIPTION})
|
|
|
|
find_feature(Xcursor ${XCURSOR_FEATURE_TYPE} ${XCURSOR_FEATURE_PURPOSE} ${XCURSOR_FEATURE_DESCRIPTION})
|
2014-07-11 00:32:46 +04:00
|
|
|
|
|
|
|
if(WITH_X11)
|
|
|
|
add_definitions(-DWITH_X11)
|
|
|
|
include_directories(${X11_INCLUDE_DIRS})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${X11_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_XSHM)
|
|
|
|
add_definitions(-DWITH_XSHM)
|
|
|
|
include_directories(${XSHM_INCLUDE_DIRS})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XSHM_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_XEXT)
|
|
|
|
add_definitions(-DWITH_XEXT)
|
|
|
|
include_directories(${XEXT_INCLUDE_DIRS})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XEXT_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_XINERAMA)
|
|
|
|
add_definitions(-DWITH_XINERAMA)
|
|
|
|
include_directories(${XINERAMA_INCLUDE_DIRS})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XINERAMA_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_XDAMAGE)
|
|
|
|
add_definitions(-DWITH_XDAMAGE)
|
|
|
|
include_directories(${XDAMAGE_INCLUDE_DIRS})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XDAMAGE_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_XFIXES)
|
|
|
|
add_definitions(-DWITH_XFIXES)
|
|
|
|
include_directories(${XFIXES_INCLUDE_DIRS})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XFIXES_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_XTEST)
|
|
|
|
add_definitions(-DWITH_XTEST)
|
|
|
|
include_directories(${XTEST_INCLUDE_DIRS})
|
|
|
|
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XTEST_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2016-03-25 18:28:17 +03:00
|
|
|
# XCursor and XRandr are currently not used so don't link them
|
|
|
|
#if(WITH_XCURSOR)
|
|
|
|
# add_definitions(-DWITH_XCURSOR)
|
|
|
|
# include_directories(${XCURSOR_INCLUDE_DIRS})
|
|
|
|
# list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XCURSOR_LIBRARIES})
|
|
|
|
#endif()
|
|
|
|
|
|
|
|
#if(WITH_XRANDR)
|
|
|
|
# add_definitions(-DWITH_XRANDR)
|
|
|
|
# include_directories(${XRANDR_INCLUDE_DIRS})
|
|
|
|
# list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XRANDR_LIBRARIES})
|
|
|
|
#endif()
|
2016-02-29 18:02:13 +03:00
|
|
|
elseif(WITH_SHADOW_MAC)
|
2014-09-13 21:12:55 +04:00
|
|
|
find_library(IOKIT IOKit)
|
|
|
|
find_library(IOSURFACE IOSurface)
|
|
|
|
find_library(CARBON Carbon)
|
|
|
|
list(APPEND ${MODULE_PREFIX}_MAC_LIBS ${IOKIT} ${IOSURFACE} ${CARBON})
|
2016-02-29 18:02:13 +03:00
|
|
|
elseif(WITH_SHADOW_WIN)
|
2016-03-25 18:28:17 +03:00
|
|
|
list(APPEND ${MODULE_PREFIX}_WIN_LIBS freerdp-client freerdp)
|
2014-09-13 21:12:55 +04:00
|
|
|
endif()
|
|
|
|
|
2014-07-18 02:27:40 +04:00
|
|
|
set(${MODULE_PREFIX}_WIN_SRCS
|
2014-08-15 02:41:22 +04:00
|
|
|
Win/win_rdp.c
|
|
|
|
Win/win_rdp.h
|
2014-08-13 03:22:42 +04:00
|
|
|
Win/win_wds.c
|
|
|
|
Win/win_wds.h
|
|
|
|
Win/win_dxgi.c
|
|
|
|
Win/win_dxgi.h
|
2014-07-18 02:27:40 +04:00
|
|
|
Win/win_shadow.c
|
|
|
|
Win/win_shadow.h)
|
|
|
|
|
2014-07-11 00:32:46 +04:00
|
|
|
set(${MODULE_PREFIX}_X11_SRCS
|
|
|
|
X11/x11_shadow.c
|
|
|
|
X11/x11_shadow.h)
|
|
|
|
|
2014-07-16 07:01:56 +04:00
|
|
|
set(${MODULE_PREFIX}_MAC_SRCS
|
|
|
|
Mac/mac_shadow.c
|
|
|
|
Mac/mac_shadow.h)
|
|
|
|
|
2014-07-18 02:27:40 +04:00
|
|
|
if(WITH_SHADOW_WIN)
|
|
|
|
add_definitions(-DWITH_SHADOW_WIN)
|
2016-02-26 20:07:30 +03:00
|
|
|
list(APPEND ${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_WIN_SRCS})
|
2014-07-18 02:27:40 +04:00
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_WIN_LIBS})
|
|
|
|
elseif(WITH_SHADOW_X11)
|
2014-07-16 07:01:56 +04:00
|
|
|
add_definitions(-DWITH_SHADOW_X11)
|
2016-02-26 20:07:30 +03:00
|
|
|
list(APPEND ${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_X11_SRCS})
|
2014-07-11 00:32:46 +04:00
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_X11_LIBS})
|
2014-07-16 07:01:56 +04:00
|
|
|
elseif(WITH_SHADOW_MAC)
|
|
|
|
add_definitions(-DWITH_SHADOW_MAC)
|
2016-02-26 20:07:30 +03:00
|
|
|
list(APPEND ${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_MAC_SRCS})
|
2014-07-16 07:01:56 +04:00
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_MAC_LIBS})
|
2014-07-11 00:32:46 +04:00
|
|
|
endif()
|
|
|
|
|
2014-09-27 03:03:48 +04:00
|
|
|
list(APPEND ${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_AUTH_LIBS})
|
|
|
|
|
2016-02-23 12:49:52 +03:00
|
|
|
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
|
|
|
|
2016-04-07 15:39:16 +03:00
|
|
|
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-shadow freerdp winpr)
|
2016-02-23 12:49:52 +03:00
|
|
|
|
2016-03-25 18:28:17 +03:00
|
|
|
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
2016-02-23 12:49:52 +03:00
|
|
|
|
2016-12-21 17:25:03 +03:00
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION})
|
2016-02-23 12:49:52 +03:00
|
|
|
if (WITH_LIBRARY_VERSIONING)
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
|
|
|
endif()
|
|
|
|
|
2016-02-29 18:22:24 +03:00
|
|
|
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server EXPORT FreeRDP-ShadowTargets)
|
2016-02-29 18:02:13 +03:00
|
|
|
|
2016-02-23 12:49:52 +03:00
|
|
|
if (WITH_DEBUG_SYMBOLS AND MSVC)
|
2017-01-31 15:32:51 +03:00
|
|
|
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2016-02-23 12:49:52 +03:00
|
|
|
COMPONENT symbols)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/shadow")
|
|
|
|
|
|
|
|
# command-line executable
|
|
|
|
|
|
|
|
set(MODULE_NAME "freerdp-shadow-cli")
|
|
|
|
set(MODULE_PREFIX "FREERDP_SERVER_SHADOW_CLI")
|
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_SRCS
|
|
|
|
shadow.c)
|
|
|
|
|
2016-02-29 18:02:13 +03:00
|
|
|
# On windows create dll version information.
|
2014-10-03 17:17:40 +04:00
|
|
|
# Vendor, product and year are already set in top level CMakeLists.txt
|
|
|
|
if (WIN32)
|
|
|
|
set (RC_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
|
|
|
|
set (RC_VERSION_MINOR ${FREERDP_VERSION_MINOR})
|
|
|
|
set (RC_VERSION_BUILD ${FREERDP_VERSION_REVISION})
|
2014-10-09 18:18:35 +04:00
|
|
|
set (RC_VERSION_FILE "${MODULE_NAME}${CMAKE_EXECUTABLE_SUFFIX}" )
|
2014-10-03 17:17:40 +04:00
|
|
|
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_SOURCE_DIR}/cmake/WindowsDLLVersion.rc.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/version.rc
|
|
|
|
@ONLY)
|
|
|
|
|
|
|
|
set ( ${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
|
|
|
|
endif()
|
|
|
|
|
2014-09-18 05:18:47 +04:00
|
|
|
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
|
|
|
|
2016-03-25 18:28:17 +03:00
|
|
|
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-shadow-subsystem freerdp-shadow winpr)
|
2014-09-18 05:18:47 +04:00
|
|
|
|
2016-03-25 18:28:17 +03:00
|
|
|
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
2014-09-18 05:18:47 +04:00
|
|
|
|
2015-07-31 12:35:54 +03:00
|
|
|
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
|
|
|
|
if (WITH_DEBUG_SYMBOLS AND MSVC)
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
COMPONENT symbols)
|
|
|
|
endif()
|
2014-09-18 05:18:47 +04:00
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/shadow")
|
2016-02-29 18:22:24 +03:00
|
|
|
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp-shadow.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp-shadow${FREERDP_VERSION_MAJOR}.pc @ONLY)
|
2017-01-16 11:25:58 +03:00
|
|
|
configure_file(freerdp-shadow-cli.1.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp-shadow-cli.1)
|
2017-01-16 13:34:32 +03:00
|
|
|
install_freerdp_man(${CMAKE_CURRENT_BINARY_DIR}/freerdp-shadow-cli.1 1)
|
2017-01-16 11:25:58 +03:00
|
|
|
|
2016-02-29 18:22:24 +03:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp-shadow${FREERDP_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
|
|
|
|
|
|
if(${CMAKE_VERSION} VERSION_GREATER "2.8.10")
|
|
|
|
|
|
|
|
export(PACKAGE freerdp-shadow)
|
|
|
|
|
2018-05-02 18:03:53 +03:00
|
|
|
SetFreeRDPCMakeInstallDir(FREERDP_SERVER_CMAKE_INSTALL_DIR "FreeRDP-Shadow${FREERDP_VERSION_MAJOR}")
|
2016-02-29 18:22:24 +03:00
|
|
|
|
|
|
|
configure_package_config_file(FreeRDP-ShadowConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfig.cmake
|
|
|
|
INSTALL_DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR}
|
|
|
|
PATH_VARS FREERDP_INCLUDE_DIR)
|
|
|
|
|
|
|
|
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfigVersion.cmake
|
|
|
|
VERSION ${FREERDP_VERSION} COMPATIBILITY SameMajorVersion)
|
|
|
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfigVersion.cmake
|
|
|
|
DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
|
|
|
|
|
|
|
install(EXPORT FreeRDP-ShadowTargets DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
|
|
|
endif()
|