cmake: add solution folder subdirectories

This commit is contained in:
Marc-André Moreau 2012-10-01 11:48:53 -04:00
parent fcc9f91302
commit 659a901450
25 changed files with 143 additions and 222 deletions

View File

@ -33,4 +33,3 @@ endforeach(FILEPATH)
if(WITH_SERVER_CHANNELS)
add_subdirectory(server)
endif()

View File

@ -15,20 +15,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
foreach(MODULE_NAME ${CHANNEL_BUILTIN_SERVER_MODULES})
string(TOUPPER "CHANNEL_${MODULE_NAME}" MODULE_PREFIX)
message(STATUS "Adding built-in channel server module: ${MODULE_NAME}")
set(MODULE_NAME "freerdp-server-channels")
set(MODULE_PREFIX "FREERDP_SERVER_CHANNELS")
foreach(SRC ${${MODULE_PREFIX}_SERVER_SRCS})
set(CHANNEL_SERVER_SRCS ${CHANNEL_SERVER_SRCS} "../${MODULE_NAME}/server/${SRC}")
foreach(_MODULE_NAME ${CHANNEL_BUILTIN_SERVER_MODULES})
string(TOUPPER "CHANNEL_${_MODULE_NAME}" _MODULE_PREFIX)
message(STATUS "Adding built-in channel server module: ${_MODULE_NAME}")
foreach(SRC ${${_MODULE_PREFIX}_SERVER_SRCS})
set(CHANNEL_SERVER_SRCS ${CHANNEL_SERVER_SRCS} "../${_MODULE_NAME}/server/${SRC}")
endforeach()
set(CHANNEL_SERVER_LIBS ${CHANNEL_SERVER_LIBS} ${${MODULE_PREFIX}_SERVER_LIBS})
set(CHANNEL_SERVER_LIBS ${CHANNEL_SERVER_LIBS} ${${_MODULE_PREFIX}_SERVER_LIBS})
endforeach()
add_library(freerdp-server ${CHANNEL_SERVER_SRCS})
add_library(${MODULE_NAME} ${CHANNEL_SERVER_SRCS})
set_target_properties(freerdp-server PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
target_link_libraries(freerdp-server ${CHANNEL_SERVER_LIBS})
install(TARGETS freerdp-server DESTINATION ${CMAKE_INSTALL_LIBDIR})
target_link_libraries(${MODULE_NAME} ${CHANNEL_SERVER_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP Client User Interfaces
#
# 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.
@ -20,8 +18,8 @@
# User Interfaces
if(NOT WIN32)
# Build Test Client
add_subdirectory(test)
# Build Sample Client
add_subdirectory(Sample)
# Build X11 Client
find_suggested_package(X11)

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP DirectFB Client
#
# 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,9 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "dfreerdp")
set(MODULE_PREFIX "FREERDP_CLIENT_DIRECTFB")
include_directories(${DIRECTFB_INCLUDE_DIRS})
set(FREERDP_CLIENT_DIRECTFB_SRCS
set(${MODULE_PREFIX}_SRCS
df_event.c
df_event.h
df_graphics.c
@ -27,14 +28,14 @@ set(FREERDP_CLIENT_DIRECTFB_SRCS
dfreerdp.c
dfreerdp.h)
add_executable(dfreerdp ${FREERDP_CLIENT_DIRECTFB_SRCS})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set(FREERDP_CLIENT_DIRECTFB_LIBS ${DIRECTFB_LIBRARIES})
set(${MODULE_PREFIX}_LIBS ${DIRECTFB_LIBRARIES})
if(WITH_MONOLITHIC_BUILD)
set(FREERDP_CLIENT_DIRECTFB_LIBS ${FREERDP_CLIENT_DIRECTFB_LIBS} freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
else()
set(FREERDP_CLIENT_DIRECTFB_LIBS ${FREERDP_CLIENT_DIRECTFB_LIBS}
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-gdi
freerdp-locale
@ -42,5 +43,7 @@ else()
freerdp-utils)
endif()
target_link_libraries(dfreerdp ${FREERDP_CLIENT_DIRECTFB_LIBS})
install(TARGETS dfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/DirectFB")

View File

@ -143,3 +143,5 @@ target_link_libraries(MacFreeRDP
freerdp-codec
freerdp-rail
)
set_property(TARGET MacFreeRDP PROPERTY FOLDER "Client/Mac")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP Test UI cmake build script
# FreeRDP Sample UI 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,21 +15,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(FREERDP_CLIENT_TEST_SRCS
set(MODULE_NAME "sfreerdp")
set(MODULE_PREFIX "FREERDP_CLIENT_SAMPLE")
set(${MODULE_PREFIX}_SRCS
freerdp.c)
add_executable(freerdp-test ${FREERDP_CLIENT_TEST_SRCS})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set(FREERDP_CLIENT_TEST_LIBS ${FREERDP_CLIENT_TEST_LIBS} ${CMAKE_DL_LIBS})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CMAKE_DL_LIBS})
if(WITH_MONOLITHIC_BUILD)
set(FREERDP_CLIENT_TEST_LIBS ${FREERDP_CLIENT_TEST_LIBS} freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
else()
set(FREERDP_CLIENT_TEST_LIBS ${FREERDP_CLIENT_TEST_LIBS}
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-gdi
freerdp-utils
freerdp-channels)
endif()
target_link_libraries(freerdp-test ${FREERDP_CLIENT_TEST_LIBS})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Sample")

View File

@ -15,7 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(FREERDP_CLIENT_WINDOWS_SRCS
set(MODULE_NAME "wfreerdp")
set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS")
set(${MODULE_PREFIX}_SRCS
wf_gdi.c
wf_gdi.h
wf_event.c
@ -31,12 +34,12 @@ set(FREERDP_CLIENT_WINDOWS_SRCS
wfreerdp.c
wfreerdp.h)
add_executable(wfreerdp WIN32 ${FREERDP_CLIENT_WINDOWS_SRCS})
add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS})
if(WITH_MONOLITHIC_BUILD)
set(FREERDP_CLIENT_WINDOWS_LIBS ${FREERDP_CLIENT_WINDOWS_LIBS} freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
else()
set(FREERDP_CLIENT_WINDOWS_LIBS ${FREERDP_CLIENT_WINDOWS_LIBS}
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-gdi
freerdp-codec
@ -44,5 +47,7 @@ else()
freerdp-utils)
endif()
target_link_libraries(wfreerdp ${FREERDP_CLIENT_WINDOWS_LIBS})
install(TARGETS wfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Windows")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP X11 Client
#
# 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,10 +15,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "wfreerdp")
set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS")
include(FindXmlto)
include_directories(${X11_INCLUDE_DIRS})
set(FREERDP_CLIENT_X11_SRCS
set(${MODULE_PREFIX}_SRCS
xf_gdi.c
xf_gdi.h
xf_rail.c
@ -42,9 +43,9 @@ set(FREERDP_CLIENT_X11_SRCS
xfreerdp.c
xfreerdp.h)
add_executable(xfreerdp ${FREERDP_CLIENT_X11_SRCS})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set(FREERDP_CLIENT_X11_LIBS
set(${MODULE_PREFIX}_LIBS
${X11_LIBRARIES}
${CMAKE_DL_LIBS})
@ -67,7 +68,7 @@ find_suggested_package(Xinerama)
if(WITH_XINERAMA)
add_definitions(-DWITH_XINERAMA -DWITH_XEXT)
include_directories(${XINERAMA_INCLUDE_DIRS})
set(FREERDP_CLIENT_X11_LIBS ${FREERDP_CLIENT_X11_LIBS} ${XINERAMA_LIBRARIES})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XINERAMA_LIBRARIES})
endif()
find_suggested_package(Xext)
@ -81,22 +82,22 @@ find_suggested_package(Xcursor)
if(WITH_XCURSOR)
add_definitions(-DWITH_XCURSOR)
include_directories(${XCURSOR_INCLUDE_DIRS})
set(FREERDP_CLIENT_X11_LIBS ${FREERDP_CLIENT_X11_LIBS} ${XCURSOR_LIBRARIES})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XCURSOR_LIBRARIES})
endif()
find_suggested_package(Xv)
if(WITH_XV)
add_definitions(-DWITH_XV)
include_directories(${XV_INCLUDE_DIRS})
set(FREERDP_CLIENT_X11_LIBS ${FREERDP_CLIENT_X11_LIBS} ${XV_LIBRARIES})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XV_LIBRARIES})
endif()
include_directories(${CMAKE_SOURCE_DIR}/resources)
if(WITH_MONOLITHIC_BUILD)
set(FREERDP_CLIENT_X11_LIBS ${FREERDP_CLIENT_X11_LIBS} freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
else()
set(FREERDP_CLIENT_X11_LIBS ${FREERDP_CLIENT_X11_LIBS}
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-gdi
freerdp-locale
@ -105,5 +106,7 @@ else()
freerdp-utils)
endif()
target_link_libraries(xfreerdp ${FREERDP_CLIENT_X11_LIBS})
install(TARGETS xfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/X11")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP Servers
#
# 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.
@ -22,7 +20,7 @@
if(NOT WIN32)
# Build Test Server
add_subdirectory(test)
add_subdirectory(Sample)
# Build X11 Server
find_suggested_package(X11)

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP Test Server cmake build script
# FreeRDP Sample Server 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,18 +15,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
add_executable(tfreerdp-server
set(MODULE_NAME "sfreerdp-server")
set(MODULE_PREFIX "FREERDP_SERVER_SAMPLE")
set(${MODULE_PREFIX}_SRCS
tfreerdp.c)
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(tfreerdp-server
target_link_libraries(${MODULE_NAME}
freerdp
freerdp-server-channels)
freerdp-server)
else()
target_link_libraries(tfreerdp-server
target_link_libraries(${MODULE_NAME}
freerdp-core
freerdp-utils
freerdp-codec
freerdp-channels
freerdp-server-channels)
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Sample")

View File

@ -15,9 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "wfreerdp-server")
set(MODULE_PREFIX "FREERDP_SERVER_WINDOWS")
include_directories(.)
set(WFREERDP_SERVER_SRCS
set(${MODULE_PREFIX}_SRCS
wf_update.c
wf_update.h
wf_dxgi.c
@ -37,37 +40,39 @@ set(WFREERDP_SERVER_SRCS
wf_info.h)
if(WITH_SERVER_INTERFACE)
add_library(wfreerdp-server ${WFREERDP_SERVER_SRCS})
set_target_properties(wfreerdp-server PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
else()
set(WFREERDP_SERVER_SRCS ${WFREERDP_SERVER_SRCS} cli/wfreerdp.c cli/wfreerdp.h)
add_executable(wfreerdp-server ${WFREERDP_SERVER_SRCS})
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/wfreerdp.c cli/wfreerdp.h)
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
if(WITH_WIN8)
set(WFREERDP_SERVER_LIBS d3d11 dxgi dxguid)
set(${MODULE_PREFIX}_LIBS d3d11 dxgi dxguid)
endif()
if(WITH_MONOLITHIC_BUILD)
set(WFREERDP_SERVER_LIBS ${WFREERDP_SERVER_LIBS} freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
else()
set(WFREERDP_SERVER_LIBS ${WFREERDP_SERVER_LIBS}
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-utils
freerdp-codec
freerdp-channels)
endif()
target_link_libraries(wfreerdp-server ${WFREERDP_SERVER_LIBS})
target_link_libraries(wfreerdp-server ${${MODULE_PREFIX}_LIBS})
if(WITH_SERVER_INTERFACE)
install(TARGETS wfreerdp-server DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
install(TARGETS wfreerdp-server DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
if(WITH_SERVER_INTERFACE)
add_subdirectory(cli)
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Windows")

View File

@ -15,20 +15,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "wfreerdp-server")
set(MODULE_PREFIX "FREERDP_SERVER_WINDOWS_CLI")
include_directories(..)
set(WFREERDP_SERVER_CLI_SRCS
set(${MODULE_PREFIX}_SRCS
wfreerdp.c
wfreerdp.h)
add_executable(wfreerdp-server-cli ${WFREERDP_SERVER_CLI_SRCS})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(wfreerdp-server-cli PROPERTIES OUTPUT_NAME "wfreerdp-server")
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "wfreerdp-server")
set(WFREERDP_SERVER_CLI_LIBS wfreerdp-server)
set(${MODULE_PREFIX}_LIBS wfreerdp-server)
target_link_libraries(wfreerdp-server-cli ${WFREERDP_SERVER_CLI_LIBS})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS wfreerdp-server-cli DESTINATION ${CMAKE_INSTALL_BINDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Windows")

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP X11 Server 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,15 +15,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(MODULE_NAME "xfreerdp-server")
set(MODULE_PREFIX "FREERDP_SERVER_X11")
include_directories(${X11_INCLUDE_DIRS})
add_executable(xfreerdp-server
set(${MODULE_PREFIX}_SRCS
xf_peer.c
xf_event.c
xf_input.c
xf_encode.c
xfreerdp.c)
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
find_suggested_package(XShm)
if(WITH_XSHM)
add_definitions(-DWITH_XSHM)
@ -36,42 +39,45 @@ find_suggested_package(Xext)
if(WITH_XEXT)
add_definitions(-DWITH_XEXT)
include_directories(${XEXT_INCLUDE_DIRS})
target_link_libraries(xfreerdp-server ${XEXT_LIBRARIES})
target_link_libraries(${MODULE_NAME} ${XEXT_LIBRARIES})
endif()
find_suggested_package(Xdamage)
if(WITH_XDAMAGE)
add_definitions(-DWITH_XDAMAGE)
include_directories(${XDAMAGE_INCLUDE_DIRS})
target_link_libraries(xfreerdp-server ${XDAMAGE_LIBRARIES})
target_link_libraries(${MODULE_NAME} ${XDAMAGE_LIBRARIES})
endif()
find_suggested_package(Xfixes)
if(WITH_XFIXES)
add_definitions(-DWITH_XFIXES)
include_directories(${XFIXES_INCLUDE_DIRS})
target_link_libraries(xfreerdp-server ${XFIXES_LIBRARIES})
target_link_libraries(${MODULE_NAME} ${XFIXES_LIBRARIES})
endif()
find_suggested_package(XTest)
if(WITH_XTEST)
add_definitions(-DWITH_XTEST)
include_directories(${XTEST_INCLUDE_DIRS})
target_link_libraries(xfreerdp-server ${XTEST_LIBRARIES})
target_link_libraries(${MODULE_NAME} ${XTEST_LIBRARIES})
endif()
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(xfreerdp-server freerdp)
target_link_libraries(xfreerdp-server winpr)
target_link_libraries(${MODULE_NAME} freerdp)
target_link_libraries(${MODULE_NAME} winpr)
else()
target_link_libraries(xfreerdp-server
target_link_libraries(${MODULE_NAME}
freerdp-core
freerdp-codec
freerdp-utils
freerdp-gdi
freerdp-crypto
freerdp-locale)
target_link_libraries(xfreerdp-server winpr-sspi)
target_link_libraries(${MODULE_NAME} winpr-sspi)
endif()
target_link_libraries(xfreerdp-server ${X11_LIBRARIES})
target_link_libraries(${MODULE_NAME} ${X11_LIBRARIES})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/X11")

View File

@ -22,4 +22,4 @@ foreach(test ${${MODULE_PREFIX}_TESTS})
add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR\\Test")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")

View File

@ -27,4 +27,4 @@ foreach(test ${${MODULE_PREFIX}_TESTS})
add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR\\Test")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")

View File

@ -1,9 +1,7 @@
# WinPR: Windows Portable Runtime
# winpr 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,6 +15,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
add_subdirectory(reg)
add_subdirectory(hash)

View File

@ -15,12 +15,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
add_executable(winpr-hash
set(MODULE_NAME "winpr-hash")
set(MODULE_PREFIX "WINPR_TOOLS_HASH")
set(${MODULE_PREFIX}_SRCS
hash.c)
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(winpr-hash winpr)
target_link_libraries(${MODULE_NAME} winpr)
else()
target_link_libraries(winpr-hash winpr-utils)
target_link_libraries(${MODULE_NAME} winpr-utils)
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools")

View File

@ -1,29 +0,0 @@
# WinPR: Windows Portable Runtime
# winpr-reg 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.
add_executable(winpr-reg
reg.c)
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(winpr-reg winpr)
else()
target_link_libraries(winpr-reg winpr-utils)
if(NOT WIN32)
target_link_libraries(winpr-reg winpr-registry)
endif()
endif()

View File

@ -1,86 +0,0 @@
/**
* FreeRDP: A Remote Desktop Protocol Client
* Registry API Tool
*
* 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.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/tchar.h>
#include <winpr/wtypes.h>
#include <winpr/print.h>
#include <winpr/registry.h>
int main(int argc, char* argv[])
{
HKEY hKey;
LONG status;
DWORD dwType;
DWORD dwSize;
DWORD dwValue;
DWORD RemoteFX;
char* ComputerName;
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\FreeRDP"), 0, KEY_READ, &hKey);
if (status != ERROR_SUCCESS)
{
_tprintf(_T("RegOpenKeyEx error: 0x%08lX\n"), status);
return 0;
}
dwValue = 0;
status = RegQueryValueEx(hKey, _T("RemoteFX"), NULL, &dwType, (BYTE*) &dwValue, &dwSize);
if (status != ERROR_SUCCESS)
{
_tprintf(_T("RegQueryValueEx error: 0x%08lX\n"), status);
return 0;
}
RemoteFX = dwValue;
status = RegQueryValueEx(hKey, _T("ComputerName"), NULL, &dwType, NULL, &dwSize);
if (status != ERROR_SUCCESS)
{
_tprintf(_T("RegQueryValueEx error: 0x%08lX\n"), status);
return 0;
}
ComputerName = (char*) malloc(dwSize + 1);
status = RegQueryValueEx(hKey, _T("ComputerName"), NULL, &dwType, (BYTE*) ComputerName, &dwSize);
if (status != ERROR_SUCCESS)
{
_tprintf(_T("RegQueryValueEx error: 0x%08lX\n"), status);
return 0;
}
printf("RemoteFX: %08lX\n", RemoteFX);
printf("ComputerName: %s\n", ComputerName);
RegCloseKey(hKey);
free(ComputerName);
return 0;
}