2012-10-08 23:02:04 -04:00
|
|
|
# FreeRDP: A Remote Desktop Protocol Implementation
|
2012-10-02 08:58:54 +02:00
|
|
|
# FreeRDP Windows cmake build script
|
|
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2013-03-18 22:09:52 -04:00
|
|
|
set(MODULE_NAME "wfreerdp-client")
|
|
|
|
|
set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS_CONTROL")
|
2012-10-02 11:05:21 -04:00
|
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_SRCS
|
2024-11-27 20:31:31 +01:00
|
|
|
wf_gdi.c
|
|
|
|
|
wf_gdi.h
|
|
|
|
|
wf_event.c
|
|
|
|
|
wf_event.h
|
|
|
|
|
wf_channels.c
|
|
|
|
|
wf_channels.h
|
|
|
|
|
wf_graphics.c
|
|
|
|
|
wf_graphics.h
|
|
|
|
|
wf_cliprdr.c
|
|
|
|
|
wf_cliprdr.h
|
|
|
|
|
wf_rail.c
|
|
|
|
|
wf_rail.h
|
|
|
|
|
wf_client.c
|
|
|
|
|
wf_client.h
|
|
|
|
|
wf_floatbar.c
|
|
|
|
|
wf_floatbar.h
|
|
|
|
|
wf_defaults.h
|
|
|
|
|
wf_defaults.c
|
|
|
|
|
resource/wfreerdp.rc
|
|
|
|
|
resource/resource.h
|
|
|
|
|
)
|
2013-03-18 22:09:52 -04:00
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
option(WITH_WINDOWS_CERT_STORE
|
|
|
|
|
"Build ${MODULE_NAME} with additional certificate validation against windows certificate store" ON
|
|
|
|
|
)
|
2021-10-22 10:06:04 -04:00
|
|
|
if(WITH_WINDOWS_CERT_STORE)
|
2024-11-12 09:36:25 +01:00
|
|
|
add_compile_definitions("WITH_WINDOWS_CERT_STORE")
|
2021-10-22 10:06:04 -04:00
|
|
|
endif()
|
|
|
|
|
|
2021-10-21 01:52:48 +03:00
|
|
|
option(WITH_WIN_CONSOLE "Build ${MODULE_NAME} with console support" OFF)
|
2021-10-11 16:00:52 -04:00
|
|
|
if(WITH_WIN_CONSOLE)
|
2024-11-12 09:36:25 +01:00
|
|
|
add_compile_definitions("WITH_WIN_CONSOLE")
|
2024-03-19 12:19:07 +01:00
|
|
|
set(WIN32_GUI_FLAG "TRUE")
|
2021-10-11 16:00:52 -04:00
|
|
|
else()
|
|
|
|
|
set(WIN32_GUI_FLAG "WIN32")
|
|
|
|
|
endif()
|
2014-10-03 15:17:40 +02:00
|
|
|
|
2021-10-21 01:29:00 +03:00
|
|
|
option(WITH_PROGRESS_BAR "Build ${MODULE_NAME} with connect progress bar (Windows 7+ or 2008 R2+)" ON)
|
|
|
|
|
if(WITH_PROGRESS_BAR)
|
2024-11-12 09:36:25 +01:00
|
|
|
add_compile_definitions("WITH_PROGRESS_BAR")
|
2021-10-21 01:29:00 +03:00
|
|
|
endif()
|
|
|
|
|
|
2024-03-19 12:19:07 +01:00
|
|
|
if(CLIENT_INTERFACE_SHARED)
|
2024-11-27 20:31:31 +01:00
|
|
|
addtargetwithresourcefile(${MODULE_NAME} "SHARED" "${FREERDP_VERSION}" ${MODULE_PREFIX}_SRCS)
|
2013-03-18 22:09:52 -04:00
|
|
|
else()
|
2024-11-27 20:31:31 +01:00
|
|
|
addtargetwithresourcefile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" ${MODULE_PREFIX}_SRCS)
|
2013-03-18 22:09:52 -04:00
|
|
|
endif()
|
2024-03-19 12:19:07 +01:00
|
|
|
target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
2012-10-02 08:58:54 +02:00
|
|
|
|
2024-04-03 09:21:39 +02:00
|
|
|
list(APPEND PUB_LIBS freerdp-client)
|
|
|
|
|
list(APPEND PUB_LIBS winpr freerdp)
|
2023-08-01 11:20:48 +02:00
|
|
|
|
2024-04-03 09:21:39 +02:00
|
|
|
list(APPEND PRIV_LIBS msimg32.lib credui.lib)
|
2023-08-03 16:49:42 +02:00
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
if(MINGW)
|
|
|
|
|
list(APPEND PRIV_LIBS ntdll.lib) # only required with MINGW
|
2023-08-03 16:49:42 +02:00
|
|
|
endif()
|
2024-04-03 09:21:39 +02:00
|
|
|
target_link_libraries(${MODULE_NAME} PUBLIC ${PUB_LIBS})
|
|
|
|
|
target_link_libraries(${MODULE_NAME} PRIVATE ${PRIV_LIBS})
|
2012-10-17 13:07:29 -04:00
|
|
|
|
2013-03-18 22:09:52 -04:00
|
|
|
if(WITH_CLIENT_INTERFACE)
|
2024-11-27 20:31:31 +01:00
|
|
|
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
2013-03-18 22:09:52 -04:00
|
|
|
endif()
|
2024-03-19 12:19:07 +01:00
|
|
|
add_subdirectory(cli)
|
2012-10-02 11:05:21 -04:00
|
|
|
|
|
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Windows")
|