Merge pull request #5187 from astrand/mingw-part1

Mingw build fixes part1
This commit is contained in:
akallabeth 2019-01-29 10:46:21 +01:00 committed by GitHub
commit 0a8ebcfcac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 24 additions and 22 deletions

View File

@ -482,7 +482,7 @@ if(WIN32)
add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
set(CMAKE_USE_RELATIVE_PATH ON)
if (${CMAKE_GENERATOR} MATCHES "NMake Makefile*" OR ${CMAKE_GENERATOR} MATCHES "Ninja*")
if (${CMAKE_GENERATOR} MATCHES "NMake Makefile*" OR ${CMAKE_GENERATOR} MATCHES "Ninja*" OR ${CMAKE_GENERATOR} MATCHES "Unix Makefiles")
set(CMAKE_PDB_BINARY_DIR ${CMAKE_BINARY_DIR})
elseif (${CMAKE_GENERATOR} MATCHES "Visual Studio*")
set(CMAKE_PDB_BINARY_DIR "${CMAKE_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")

View File

@ -27,8 +27,8 @@
#include <stdlib.h>
#include <string.h>
#include <Windows.h>
#include <MMSystem.h>
#include <windows.h>
#include <mmsystem.h>
#include <winpr/crt.h>
#include <winpr/cmdline.h>

View File

@ -29,8 +29,8 @@
#include <stdlib.h>
#include <string.h>
#include <Windows.h>
#include <MMSystem.h>
#include <windows.h>
#include <mmsystem.h>
#include <winpr/crt.h>
#include <winpr/cmdline.h>

View File

@ -78,6 +78,7 @@ endif()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} msimg32)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
if(WITH_CLIENT_INTERFACE)

View File

@ -783,7 +783,7 @@ static int freerdp_client_focus_out(wfContext* wfc)
return 0;
}
static int freerdp_client_set_window_size(wfContext* wfc, int width, int height)
int freerdp_client_set_window_size(wfContext* wfc, int width, int height)
{
WLog_DBG(TAG, "freerdp_client_set_window_size %d, %d", width, height);

View File

@ -27,10 +27,10 @@
#define CINTERFACE
#define COBJMACROS
#include <Ole2.h>
#include <ShlObj.h>
#include <Windows.h>
#include <WinUser.h>
#include <ole2.h>
#include <shlobj.h>
#include <windows.h>
#include <winuser.h>
#include <assert.h>
@ -41,7 +41,7 @@
#include <freerdp/log.h>
#include <freerdp/client/cliprdr.h>
#include <Strsafe.h>
#include <strsafe.h>
#include "wf_cliprdr.h"

View File

@ -63,13 +63,13 @@ FIND_PATH(OPENSSL_INCLUDE_DIR
include
)
IF(WIN32)
IF(MSVC)
if(${MSVC_RUNTIME} STREQUAL "static")
set(MSVC_RUNTIME_SUFFIX "MT")
else()
set(MSVC_RUNTIME_SUFFIX "MD")
endif()
ENDIF(WIN32)
ENDIF(MSVC)
IF(ANDROID)
FIND_LIBRARY(OPENSSL_LIBRARIES

View File

@ -309,7 +309,7 @@ WINPR_API BOOL PathIsDirectoryEmptyW(LPCWSTR pszPath);
#endif
#ifdef _WIN32
#include <Shlwapi.h>
#include <shlwapi.h>
#endif
#endif /* WINPR_PATH_H */

View File

@ -121,7 +121,7 @@ if (WIN32)
@ONLY)
set (WINPR_SRCS ${WINPR_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
list(APPEND WINPR_LIBS "Shlwapi")
list(APPEND WINPR_LIBS "shlwapi")
endif()
add_library(${MODULE_NAME} ${WINPR_SRCS})

View File

@ -20,7 +20,8 @@ winpr_module_add(
clipboard.c
clipboard.h)
if(HAVE_UNISTD_H)
# MinGW has unistd.h
if(HAVE_UNISTD_H AND NOT WIN32)
winpr_definition_add(-DWITH_WCLIPBOARD_POSIX)
winpr_module_add(
posix.h

View File

@ -41,7 +41,7 @@
#endif
#if defined(WIN32)
#include <Shlobj.h>
#include <shlobj.h>
#else
#include <errno.h>
#include <dirent.h>

View File

@ -147,7 +147,7 @@ if((FREEBSD) AND (NOT KFREEBSD))
endif()
if(WIN32)
winpr_library_add(Dbghelp)
winpr_library_add(dbghelp)
endif()
if(BUILD_TESTING)

View File

@ -36,8 +36,8 @@
#if defined(_WIN32) || defined(_WIN64)
#include <io.h>
#include <Windows.h>
#include <Dbghelp.h>
#include <windows.h>
#include <dbghelp.h>
#define write _write
#endif

View File

@ -413,7 +413,7 @@ BOOL WINAPI Win32_WTSVirtualChannelRead_Static(WTSAPI_CHANNEL* pChannel, DWORD d
CopyMemory(lpBuffer, pChannel->chunk, numBytesToRead);
*lpNumberOfBytesTransferred += numBytesToRead;
((BYTE*) lpBuffer) += numBytesToRead;
lpBuffer = (BYTE*)lpBuffer + numBytesToRead;
nNumberOfBytesToRead -= numBytesToRead;
pChannel->readOffset += numBytesToRead;
@ -524,7 +524,7 @@ BOOL WINAPI Win32_WTSVirtualChannelRead_Dynamic(WTSAPI_CHANNEL* pChannel, DWORD
CopyMemory(lpBuffer, pChannel->header, numBytesRead);
*lpNumberOfBytesTransferred += numBytesRead;
((BYTE*) lpBuffer) += numBytesRead;
lpBuffer = (BYTE*)lpBuffer + numBytesRead;
nNumberOfBytesToRead -= numBytesRead;
}