merged from channels

This commit is contained in:
Corey C 2012-10-04 20:19:17 -04:00
commit eb99c8a382
60 changed files with 477 additions and 207 deletions

View File

@ -18,8 +18,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.8)
project(FreeRDP C)
set(CMAKE_COLOR_MAKEFILE ON)
# Include cmake modules

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# 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.
@ -17,22 +15,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(AUDIN_SRCS
set(MODULE_NAME "audin")
set(MODULE_PREFIX "CHANNEL_AUDIN_CLIENT")
set(${MODULE_PREFIX}_SRCS
audin_main.c
audin_main.h)
include_directories(..)
add_library(audin ${AUDIN_SRCS})
set_target_properties(audin PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(audin freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
else()
target_link_libraries(audin freerdp-utils)
target_link_libraries(${MODULE_NAME} freerdp-utils)
endif()
install(TARGETS audin DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
if(WITH_ALSA)
add_subdirectory(alsa)

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# 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.
@ -17,20 +15,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(CLIPRDR_SRCS
set(MODULE_NAME "cliprdr")
set(MODULE_PREFIX "CHANNEL_CLIPRDR_CLIENT")
set(${MODULE_PREFIX}_SRCS
cliprdr_constants.h
cliprdr_format.c
cliprdr_format.h
cliprdr_main.c
cliprdr_main.h)
add_library(cliprdr ${CLIPRDR_SRCS})
set_target_properties(cliprdr PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(cliprdr freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
else()
target_link_libraries(cliprdr freerdp-utils)
target_link_libraries(${MODULE_NAME} freerdp-utils)
endif()
install(TARGETS cliprdr DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# 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.
@ -17,22 +15,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(DRDYNVC_SRCS
set(MODULE_NAME "drdynvc")
set(MODULE_PREFIX "CHANNEL_DRDYNVC_CLIENT")
set(${MODULE_PREFIX}_SRCS
drdynvc_main.c
drdynvc_main.h
drdynvc_types.h
dvcman.c
dvcman.h
)
dvcman.h)
add_library(drdynvc ${DRDYNVC_SRCS})
set_target_properties(drdynvc PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(drdynvc freerdp winpr)
target_link_libraries(${MODULE_NAME} freerdp winpr)
else()
target_link_libraries(drdynvc freerdp-utils winpr-synch)
target_link_libraries(${MODULE_NAME} freerdp-utils winpr-synch)
endif()
install(TARGETS drdynvc DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -1,8 +1,6 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -17,20 +15,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(RAIL_SRCS
set(MODULE_NAME "rail")
set(MODULE_PREFIX "CHANNEL_RAIL_CLIENT")
set(${MODULE_PREFIX}_SRCS
rail_main.c
rail_main.h
rail_orders.c
rail_orders.h)
add_library(rail ${RAIL_SRCS})
set_target_properties(rail PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(rail freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
else()
target_link_libraries(rail freerdp-utils)
target_link_libraries(${MODULE_NAME} freerdp-utils)
endif()
install(TARGETS rail DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# 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.
@ -17,7 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(RDPDR_SRCS
set(MODULE_NAME "rdpdr")
set(MODULE_PREFIX "CHANNEL_RDPDR_CLIENT")
set(${MODULE_PREFIX}_SRCS
rdpdr_constants.h
rdpdr_types.h
rdpdr_capabilities.c
@ -29,19 +30,22 @@ set(RDPDR_SRCS
rdpdr_main.c
rdpdr_main.h)
add_library(rdpdr ${RDPDR_SRCS})
set_target_properties(rdpdr PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(rdpdr freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
else()
target_link_libraries(rdpdr freerdp-utils)
target_link_libraries(${MODULE_NAME} freerdp-utils)
endif()
install(TARGETS rdpdr DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
add_subdirectory(disk)
add_subdirectory(printer)
if(NOT WIN32)
add_subdirectory(parallel)
add_subdirectory(serial)

View File

@ -17,20 +17,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(RDPSND_SRCS
set(MODULE_NAME "rdpsnd")
set(MODULE_PREFIX "CHANNEL_RDPSND_CLIENT")
set(${MODULE_PREFIX}_SRCS
rdpsnd_main.c
rdpsnd_main.h)
add_library(rdpsnd ${RDPSND_SRCS})
set_target_properties(rdpsnd PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${RDPSND_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(rdpsnd freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
else()
target_link_libraries(rdpsnd freerdp-utils)
target_link_libraries(${MODULE_NAME} freerdp-utils)
endif()
install(TARGETS rdpsnd DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
if(WITH_ALSA)
add_subdirectory(alsa)
@ -41,6 +44,5 @@ if(WITH_PULSEAUDIO)
endif()
if(WITH_MACAUDIO)
add_subdirectory(mac_audio)
add_subdirectory(MacAudio)
endif()

View File

@ -2,9 +2,7 @@
# FreeRDP cmake build script
#
# Copyright 2012 Laxmikant Rashinkar <LK.Rashinkar@gmail.com>
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# 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.

View File

@ -15,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "rdpsnd")
set(MODULE_PREFIX "CHANNEL_RDPSND_SERVER")
set(${MODULE_PREFIX}_SRCS
@ -27,3 +28,4 @@ else()
set(${MODULE_PREFIX}_LIBS freerdp-utils PARENT_SCOPE)
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Server")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# 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.
@ -17,17 +15,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(SKEL_SRCS
set(MODULE_NAME "sample")
set(MODULE_PREFIX "CHANNEL_SAMPLE_CLIENT")
set(${MODULE_PREFIX}_SRCS
skel_main.c
skel_main.h)
add_library(skel ${SKEL_SRCS})
set_target_properties(skel PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(skel freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
else()
target_link_libraries(skel freerdp-utils)
target_link_libraries(${MODULE_NAME} freerdp-utils)
endif()
install(TARGETS skel DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})

View File

@ -15,8 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "freerdp-server-channels")
set(MODULE_PREFIX "FREERDP_SERVER_CHANNELS")
set(MODULE_NAME "freerdp-channels-server")
set(MODULE_PREFIX "FREERDP_CHANNELS_SERVER")
foreach(_MODULE_NAME ${CHANNEL_BUILTIN_SERVER_MODULES})
string(TOUPPER "CHANNEL_${_MODULE_NAME}" _MODULE_PREFIX)
@ -35,3 +35,5 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL}
target_link_libraries(${MODULE_NAME} ${CHANNEL_SERVER_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Server")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -18,7 +16,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(TSMF_SRCS
set(MODULE_NAME "tsmf")
set(MODULE_PREFIX "CHANNEL_TSMF_CLIENT")
set(${MODULE_PREFIX}_SRCS
tsmf_audio.c
tsmf_audio.h
tsmf_codec.c
@ -36,25 +37,27 @@ set(TSMF_SRCS
include_directories(..)
add_library(tsmf ${TSMF_SRCS})
set_target_properties(tsmf PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(tsmf freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
else()
target_link_libraries(tsmf freerdp-utils)
target_link_libraries(${MODULE_NAME} freerdp-utils)
endif()
install(TARGETS tsmf DESTINATION ${FREERDP_PLUGIN_PATH})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
if(WITH_FFMPEG)
add_subdirectory(ffmpeg)
endif()
if(WITH_XRANDR)
if(GSTREAMER_FOUND)
add_subdirectory(gstreamer)
endif()
if(GSTREAMER_FOUND)
add_subdirectory(gstreamer)
endif()
endif()
if(WITH_ALSA)
@ -64,4 +67,3 @@ endif()
if(WITH_PULSEAUDIO)
add_subdirectory(pulse)
endif()

View File

@ -20,5 +20,3 @@ add_subdirectory(libusb)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
endif()

View File

@ -16,27 +16,38 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(URBDRC_SRCS
searchman.c
searchman.h
set(MODULE_NAME "urbdrc")
set(MODULE_PREFIX "CHANNEL_URBDRC_CLIENT")
set(${MODULE_PREFIX}_SRCS
searchman.c
searchman.h
isoch_queue.c
isoch_queue.h
data_transfer.c
data_transfer.h
urbdrc_main.c
urbdrc_main.h
data_transfer.c
data_transfer.h
urbdrc_main.c
urbdrc_main.h
urbdrc_types.h)
include_directories(..)
add_library(urbdrc ${URBDRC_SRCS})
set_target_properties(urbdrc PROPERTIES PREFIX "")
add_library(${MODULE_NAME} ${URBDRC_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
target_link_libraries(urbdrc udev)
target_link_libraries(urbdrc dbus-glib-1)
target_link_libraries(urbdrc pthread)
target_link_libraries(urbdrc uuid)
target_link_libraries(urbdrc freerdp-utils)
set(${MODULE_PREFIX}_LIBS
dbus-glib-1
udev
uuid)
install(TARGETS urbdrc DESTINATION ${FREERDP_PLUGIN_PATH})
if(WITH_MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
target_link_libraries(${MODULE_NAME} ${MODULE_PREFIX}_LIBS)
else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils)
target_link_libraries(${MODULE_NAME} ${MODULE_PREFIX}_LIBS)
endif()
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -15,36 +15,41 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "freerdp")
set(MODULE_PREFIX "FREERDP")
if(WITH_MONOLITHIC_BUILD)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
add_subdirectory(utils)
add_subdirectory(gdi)
add_subdirectory(rail)
add_subdirectory(cache)
add_subdirectory(codec)
add_subdirectory(crypto)
add_subdirectory(channels)
add_subdirectory(locale)
add_subdirectory(core)
set(${MODULE_PREFIX}_SUBMODULES
utils
gdi
rail
cache
codec
crypto
channels
locale
core)
foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES})
add_subdirectory(${${MODULE_PREFIX}_SUBMODULE})
endforeach()
if(WITH_MONOLITHIC_BUILD)
add_library(freerdp
$<TARGET_OBJECTS:freerdp-utils>
$<TARGET_OBJECTS:freerdp-gdi>
$<TARGET_OBJECTS:freerdp-rail>
$<TARGET_OBJECTS:freerdp-cache>
$<TARGET_OBJECTS:freerdp-codec>
$<TARGET_OBJECTS:freerdp-crypto>
$<TARGET_OBJECTS:freerdp-channels>
$<TARGET_OBJECTS:freerdp-locale>
$<TARGET_OBJECTS:freerdp-core>)
set_target_properties(freerdp PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES})
set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$<TARGET_OBJECTS:${MODULE_NAME}-${${MODULE_PREFIX}_SUBMODULE}>")
endforeach()
target_link_libraries(freerdp ${FREERDP_LIBS})
install(TARGETS freerdp DESTINATION ${CMAKE_INSTALL_LIBDIR})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_OBJECTS})
set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")
endif()

View File

@ -47,4 +47,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -48,4 +48,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -99,4 +99,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -133,4 +133,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -67,4 +67,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -59,4 +59,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -89,4 +89,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -42,4 +42,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -86,4 +86,4 @@ else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")

View File

@ -26,14 +26,14 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(${MODULE_NAME}
freerdp
freerdp-server)
freerdp-channels-server)
else()
target_link_libraries(${MODULE_NAME}
freerdp-core
freerdp-utils
freerdp-codec
freerdp-channels
freerdp-server-channels)
freerdp-channels-server)
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Sample")

View File

@ -61,8 +61,8 @@ else()
freerdp-codec
freerdp-channels)
endif()
target_link_libraries(wfreerdp-server ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
if(WITH_SERVER_INTERFACE)

View File

@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "wfreerdp-server")
set(MODULE_NAME "wfreerdp-server-cli")
set(MODULE_PREFIX "FREERDP_SERVER_WINDOWS_CLI")
include_directories(..)

View File

@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.8)
project(WinPR C)

View File

@ -135,10 +135,11 @@ WINPR_API LONG InterlockedDecrement(LONG volatile *Addend);
WINPR_API LONG InterlockedExchange(LONG volatile *Target, LONG Value);
WINPR_API LONG InterlockedExchangeAdd(LONG volatile *Addend, LONG Value);
WINPR_API LONG InterlockedCompareExchange(LONG volatile *Destination,LONG Exchange, LONG Comperand);
WINPR_API LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand);
WINPR_API LONG InterlockedCompareExchange(LONG volatile *Destination, LONG Exchange, LONG Comperand);
#endif /* _WIN32 */
WINPR_API LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand);
#endif /* WINPR_INTERLOCKED_H */

View File

@ -15,6 +15,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "winpr")
set(MODULE_PREFIX "WINPR")
if (APPLE)
# flat_namespace should be avoided, but is required for -undefined warning. Since WinPR currently has
# a lot of undefined symbols in use, use this hack until they're filled out.
@ -25,61 +28,33 @@ if(WITH_MONOLITHIC_BUILD)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
add_subdirectory(crt)
add_subdirectory(utils)
add_subdirectory(heap)
add_subdirectory(path)
add_subdirectory(io)
add_subdirectory(file)
add_subdirectory(error)
add_subdirectory(environment)
add_subdirectory(interlocked)
add_subdirectory(handle)
add_subdirectory(synch)
add_subdirectory(thread)
add_subdirectory(sysinfo)
add_subdirectory(bcrypt)
add_subdirectory(dsparse)
add_subdirectory(asn1)
add_subdirectory(rpc)
add_subdirectory(sspicli)
add_subdirectory(sspi)
add_subdirectory(registry)
add_subdirectory(library)
add_subdirectory(timezone)
add_subdirectory(winsock)
add_subdirectory(winhttp)
set(FILENAME "ModuleOptions.cmake")
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
foreach(FILEPATH ${FILEPATHS})
if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" ${MODULE_PREFIX}_SUBMODULE ${FILEPATH})
set(${MODULE_PREFIX}_SUBMODULES ${${MODULE_PREFIX}_SUBMODULES} ${${MODULE_PREFIX}_SUBMODULE})
endif()
endforeach(FILEPATH)
foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES})
add_subdirectory(${${MODULE_PREFIX}_SUBMODULE})
endforeach()
if(WITH_MONOLITHIC_BUILD)
add_library(winpr
$<TARGET_OBJECTS:winpr-crt>
$<TARGET_OBJECTS:winpr-utils>
$<TARGET_OBJECTS:winpr-heap>
$<TARGET_OBJECTS:winpr-path>
$<TARGET_OBJECTS:winpr-io>
$<TARGET_OBJECTS:winpr-file>
$<TARGET_OBJECTS:winpr-error>
$<TARGET_OBJECTS:winpr-environment>
$<TARGET_OBJECTS:winpr-interlocked>
$<TARGET_OBJECTS:winpr-handle>
$<TARGET_OBJECTS:winpr-synch>
$<TARGET_OBJECTS:winpr-thread>
$<TARGET_OBJECTS:winpr-sysinfo>
$<TARGET_OBJECTS:winpr-bcrypt>
$<TARGET_OBJECTS:winpr-dsparse>
$<TARGET_OBJECTS:winpr-asn1>
$<TARGET_OBJECTS:winpr-rpc>
$<TARGET_OBJECTS:winpr-sspicli>
$<TARGET_OBJECTS:winpr-sspi>
$<TARGET_OBJECTS:winpr-registry>
$<TARGET_OBJECTS:winpr-library>
$<TARGET_OBJECTS:winpr-timezone>
$<TARGET_OBJECTS:winpr-winsock>
$<TARGET_OBJECTS:winpr-winhttp>)
set_target_properties(winpr PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
target_link_libraries(winpr ${WINPR_LIBS})
install(TARGETS winpr DESTINATION ${CMAKE_INSTALL_LIBDIR})
foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES})
set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$<TARGET_OBJECTS:${MODULE_NAME}-${${MODULE_PREFIX}_SUBMODULE}>")
endforeach()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_OBJECTS})
set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib")
target_link_libraries(${MODULE_NAME} ${WINPR_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/libwinpr")
endif()

View File

@ -23,7 +23,7 @@ set(${MODULE_PREFIX}_SRCS
memory.c
string.c)
if(MSVC)
if(MSVC AND (NOT WITH_MONOLITHIC_BUILD))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()

View File

@ -41,3 +41,7 @@ else()
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(BUILD_TESTING)
add_subdirectory(test)
endif()

3
winpr/libwinpr/file/test/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
TestFile
TestFile.c

View File

@ -0,0 +1,28 @@
set(MODULE_NAME "TestFile")
set(MODULE_PREFIX "TEST_FILE")
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c)
set(${MODULE_PREFIX}_TESTS
TestFileCreateFile.c
TestFileDeleteFile.c
TestFileReadFile.c
TestFileWriteFile.c)
create_test_sourcelist(${MODULE_PREFIX}_SRCS
${${MODULE_PREFIX}_DRIVER}
${${MODULE_PREFIX}_TESTS})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(NOT WIN32)
target_link_libraries(${MODULE_NAME} winpr-file)
endif()
foreach(test ${${MODULE_PREFIX}_TESTS})
get_filename_component(TestName ${test} NAME_WE)
add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestFileCreateFile(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestFileDeleteFile(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestFileReadFile(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestFileWriteFile(int argc, char* argv[])
{
return 0;
}

View File

@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_HEAP")
set(${MODULE_PREFIX}_SRCS
heap.c)
if(MSVC)
if(MSVC AND (NOT WITH_MONOLITHIC_BUILD))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()

View File

@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_INTERLOCKED")
set(${MODULE_PREFIX}_SRCS
interlocked.c)
if(MSVC)
if(MSVC AND (NOT WITH_MONOLITHIC_BUILD))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()

View File

@ -246,6 +246,45 @@ LONG InterlockedCompareExchange(LONG volatile *Destination, LONG Exchange, LONG
#endif
}
#endif /* _WIN32 */
#if (_WIN32_WINNT < 0x0502)
static volatile HANDLE mutex = NULL;
int static_mutex_lock(volatile HANDLE* static_mutex)
{
if (*static_mutex == NULL)
{
HANDLE handle = CreateMutex(NULL, FALSE, NULL);
if (InterlockedCompareExchangePointer((PVOID*) static_mutex, (PVOID) handle, NULL) != NULL)
CloseHandle(handle);
}
return WaitForSingleObject(*static_mutex, INFINITE) == WAIT_FAILED;
}
/* Not available in XP */
LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand)
{
LONGLONG previousValue = 0;
static_mutex_lock(&mutex);
previousValue = *Destination;
if (*Destination == Comperand)
*Destination = Exchange;
ReleaseMutex(mutex);
return previousValue;
}
#else /* (_WIN32_WINNT < 0x0600) */
LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand)
{
#ifdef __GNUC__
@ -255,4 +294,5 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E
#endif
}
#endif
#endif /* (_WIN32_WINNT < 0x0600) */

View File

@ -1,2 +1,3 @@
LIBRARY "libwinpr-interlocked"
EXPORTS
InterlockedCompareExchange64 @1

View File

@ -14,9 +14,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(NOT WIN32)
target_link_libraries(${MODULE_NAME} winpr-interlocked)
endif()
target_link_libraries(${MODULE_NAME} winpr-interlocked)
foreach(test ${${MODULE_PREFIX}_TESTS})
get_filename_component(TestName ${test} NAME_WE)

View File

@ -36,3 +36,7 @@ else()
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(BUILD_TESTING)
add_subdirectory(test)
endif()

3
winpr/libwinpr/io/test/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
TestIO
TestIO.c

View File

@ -0,0 +1,25 @@
set(MODULE_NAME "TestIo")
set(MODULE_PREFIX "TEST_IO")
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c)
set(${MODULE_PREFIX}_TESTS
TestIoGetOverlappedResult.c)
create_test_sourcelist(${MODULE_PREFIX}_SRCS
${${MODULE_PREFIX}_DRIVER}
${${MODULE_PREFIX}_TESTS})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(NOT WIN32)
target_link_libraries(${MODULE_NAME} winpr-io)
endif()
foreach(test ${${MODULE_PREFIX}_TESTS})
get_filename_component(TestName ${test} NAME_WE)
add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/io.h>
#include <winpr/crt.h>
#include <winpr/windows.h>
int TestIoGetOverlappedResult(int argc, char* argv[])
{
return 0;
}

View File

@ -36,3 +36,7 @@ else()
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -0,0 +1,3 @@
TestLibrary
TestLibrary.c

View File

@ -0,0 +1,30 @@
set(MODULE_NAME "TestLibrary")
set(MODULE_PREFIX "TEST_LIBRARY")
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c)
set(${MODULE_PREFIX}_TESTS
TestLibraryAddDllDirectory.c
TestLibraryRemoveDllDirectory.c
TestLibrarySetDefaultDllDirectories.c
TestLibraryLoadLibrary.c
TestLibraryFreeLibrary.c
TestLibraryGetProcAddress.c)
create_test_sourcelist(${MODULE_PREFIX}_SRCS
${${MODULE_PREFIX}_DRIVER}
${${MODULE_PREFIX}_TESTS})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(NOT WIN32)
target_link_libraries(${MODULE_NAME} winpr-library)
endif()
foreach(test ${${MODULE_PREFIX}_TESTS})
get_filename_component(TestName ${test} NAME_WE)
add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestLibraryAddDllDirectory(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestLibraryFreeLibrary(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestLibraryGetProcAddress(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestLibraryLoadLibrary(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestLibraryRemoveDllDirectory(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/windows.h>
int TestLibrarySetDefaultDllDirectories(int argc, char* argv[])
{
return 0;
}

View File

@ -34,11 +34,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(WIN32)
target_link_libraries(${MODULE_NAME} Pathcch)
else()
target_link_libraries(${MODULE_NAME} winpr-path)
endif()
target_link_libraries(${MODULE_NAME} winpr-path)
foreach(test ${${MODULE_PREFIX}_TESTS})
get_filename_component(TestName ${test} NAME_WE)

View File

@ -37,7 +37,7 @@ set(${MODULE_PREFIX}_SRCS
timer.c
wait.c)
if(MSVC)
if(MSVC AND (NOT WITH_MONOLITHIC_BUILD))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()

View File

@ -0,0 +1,9 @@
set(MINWIN_LAYER "0")
set(MINWIN_GROUP "none")
set(MINWIN_MAJOR_VERSION "0")
set(MINWIN_MINOR_VERSION "0")
set(MINWIN_SHORT_NAME "utils")
set(MINWIN_LONG_NAME "WinPR Utils")
set(MODULE_LIBRARY_NAME "${MINWIN_SHORT_NAME}")