Skip to content

Commit

Permalink
Merge pull request FreeRDP#2962 from akallabeth/client_build_fixes
Browse files Browse the repository at this point in the history
Allow client build to be disabled
  • Loading branch information
hardening committed Nov 10, 2015
2 parents 2ac195e + 9b7c35e commit aff69ab
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,8 @@ if(WITH_CHANNELS)
add_subdirectory(channels)
endif()

if(WITH_CLIENT)
add_subdirectory(client)
if(WITH_CLIENT_COMMON OR WITH_CLIENT)
add_subdirectory(client)
endif()

if(WITH_SERVER)
Expand Down
40 changes: 20 additions & 20 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

add_subdirectory(common)

if(FREERDP_VENDOR)
if(FREERDP_VENDOR AND WITH_CLIENT)
if(WIN32)
add_subdirectory(Windows)
else()
Expand Down Expand Up @@ -58,28 +58,28 @@ if(FREERDP_VENDOR)
endif()

# Pick up other clients
if(WITH_CLIENT)
set(FILENAME "ModuleOptions.cmake")
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")

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" FREERDP_CLIENT ${FILEPATH})
set(FREERDP_CLIENT_ENABLED 0)
include(${FILEPATH})
if(FREERDP_CLIENT_ENABLED)
if(NOT (${FREERDP_CLIENT_VENDOR} MATCHES "FreeRDP"))
list(APPEND FREERDP_EXTRA_CLIENTS ${FREERDP_CLIENT})
if(${FREERDP_CLIENT_VENDOR} MATCHES "${VENDOR}")
set(CLIENT_VENDOR_PATH "client/${FREERDP_CLIENT}" PARENT_SCOPE)
foreach(FILEPATH ${FILEPATHS})
if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
set(FREERDP_CLIENT_ENABLED 0)
include(${FILEPATH})
if(FREERDP_CLIENT_ENABLED)
if(NOT (${FREERDP_CLIENT_VENDOR} MATCHES "FreeRDP"))
list(APPEND FREERDP_EXTRA_CLIENTS ${FREERDP_CLIENT})
if(${FREERDP_CLIENT_VENDOR} MATCHES "${VENDOR}")
set(CLIENT_VENDOR_PATH "client/${FREERDP_CLIENT}" PARENT_SCOPE)
endif()
endif()
endif()
endif()
endif()
endforeach()

foreach(FREERDP_CLIENT ${FREERDP_EXTRA_CLIENTS})
add_subdirectory(${FREERDP_CLIENT})
endforeach()
endforeach()

foreach(FREERDP_CLIENT ${FREERDP_EXTRA_CLIENTS})
add_subdirectory(${FREERDP_CLIENT})
endforeach()
endif()

9 changes: 5 additions & 4 deletions cmake/ConfigOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ CMAKE_DEPENDENT_OPTION(TESTS_WTSAPI_EXTRA "Build extra WTSAPI tests (interactive

option(WITH_SAMPLE "Build sample code" OFF)

option(WITH_CLIENT "Build client binaries" ON)
option(WITH_CLIENT_COMMON "Build client common library" ON)
cmake_dependent_option(WITH_CLIENT "Build client binaries" ON WITH_CLIENT_COMMON ON)

option(WITH_SERVER "Build server binaries" OFF)

option(STATIC_CHANNELS "Build channels statically" ON)

option(WITH_CHANNELS "Build virtual channel plugins" ON)

if(WITH_CLIENT AND WITH_CHANNELS)
option(WITH_CLIENT_CHANNELS "Build virtual channel plugins" ON)
endif()
cmake_dependent_option(WITH_CLIENT_CHANNELS "Build virtual channel plugins" ON
"WITH_CLIENT_COMMON;WITH_CHANNELS" ON)

if(WITH_SERVER AND WITH_CHANNELS)
option(WITH_SERVER_CHANNELS "Build virtual channel plugins" ON)
Expand Down
4 changes: 2 additions & 2 deletions winpr/libwinpr/path/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,13 +596,13 @@ HRESULT PathCchRemoveExtensionW(PWSTR pszPath, size_t cchPath)
BOOL PathCchIsRootA(PCSTR pszPath)
{
WLog_ERR(TAG, "%s: not implemented", __FUNCTION__);
return E_NOTIMPL;
return FALSE;
}

BOOL PathCchIsRootW(PCWSTR pszPath)
{
WLog_ERR(TAG, "%s: not implemented", __FUNCTION__);
return E_NOTIMPL;
return FALSE;
}

/**
Expand Down

0 comments on commit aff69ab

Please sign in to comment.