cmake: fixed errors with Android build
This commit is contained in:
parent
b3d34f62dc
commit
30cb77835b
@ -98,7 +98,7 @@ endif()
|
||||
|
||||
# Compiler-specific flags
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT ANDROID)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
@ -182,7 +182,9 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
if(NOT ANDROID)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
if(UNIX OR CYGWIN)
|
||||
set(X11_FEATURE_TYPE "RECOMMENDED")
|
||||
|
@ -161,9 +161,6 @@ FREERDP_ADDIN** freerdp_channels_list_client_static_addins(LPSTR pszName, LPSTR
|
||||
return ppAddins;
|
||||
}
|
||||
|
||||
LPCSTR gAddinPath = FREERDP_ADDIN_PATH;
|
||||
LPCSTR gInstallPrefix = FREERDP_INSTALL_PREFIX;
|
||||
|
||||
FREERDP_ADDIN** freerdp_channels_list_dynamic_addins(LPSTR pszName, LPSTR pszSubsystem, LPSTR pszType, DWORD dwFlags)
|
||||
{
|
||||
int index;
|
||||
@ -172,6 +169,8 @@ FREERDP_ADDIN** freerdp_channels_list_dynamic_addins(LPSTR pszName, LPSTR pszSub
|
||||
DWORD nAddins;
|
||||
LPSTR pszPattern;
|
||||
size_t cchPattern;
|
||||
LPCSTR pszAddinPath = FREERDP_ADDIN_PATH;
|
||||
LPCSTR pszInstallPrefix = FREERDP_INSTALL_PREFIX;
|
||||
LPCSTR pszExtension;
|
||||
LPSTR pszSearchPath;
|
||||
size_t cchSearchPath;
|
||||
@ -180,8 +179,8 @@ FREERDP_ADDIN** freerdp_channels_list_dynamic_addins(LPSTR pszName, LPSTR pszSub
|
||||
FREERDP_ADDIN** ppAddins;
|
||||
WIN32_FIND_DATAA FindData;
|
||||
|
||||
cchAddinPath = strlen(gAddinPath);
|
||||
cchInstallPrefix = strlen(gInstallPrefix);
|
||||
cchAddinPath = strlen(pszAddinPath);
|
||||
cchInstallPrefix = strlen(pszInstallPrefix);
|
||||
|
||||
pszExtension = PathGetSharedLibraryExtensionA(0);
|
||||
|
||||
@ -210,10 +209,10 @@ FREERDP_ADDIN** freerdp_channels_list_dynamic_addins(LPSTR pszName, LPSTR pszSub
|
||||
cchSearchPath = cchInstallPrefix + cchAddinPath + cchPattern + 3;
|
||||
pszSearchPath = (LPSTR) malloc(cchSearchPath + 1);
|
||||
|
||||
CopyMemory(pszSearchPath, gInstallPrefix, cchInstallPrefix);
|
||||
CopyMemory(pszSearchPath, pszInstallPrefix, cchInstallPrefix);
|
||||
pszSearchPath[cchInstallPrefix] = '\0';
|
||||
|
||||
NativePathCchAppendA(pszSearchPath, cchSearchPath + 1, gAddinPath);
|
||||
NativePathCchAppendA(pszSearchPath, cchSearchPath + 1, pszAddinPath);
|
||||
NativePathCchAppendA(pszSearchPath, cchSearchPath + 1, pszPattern);
|
||||
|
||||
cchSearchPath = strlen(pszSearchPath);
|
||||
|
@ -31,9 +31,6 @@
|
||||
|
||||
#include <freerdp/addin.h>
|
||||
|
||||
LPCSTR gAddinPath = FREERDP_ADDIN_PATH;
|
||||
LPCSTR gLibraryPath = FREERDP_LIBRARY_PATH;
|
||||
LPCSTR gInstallPrefix = FREERDP_INSTALL_PREFIX;
|
||||
|
||||
LPSTR freerdp_get_library_install_path()
|
||||
{
|
||||
@ -41,17 +38,19 @@ LPSTR freerdp_get_library_install_path()
|
||||
size_t cchPath;
|
||||
size_t cchLibraryPath;
|
||||
size_t cchInstallPrefix;
|
||||
LPCSTR pszLibraryPath = FREERDP_LIBRARY_PATH;
|
||||
LPCSTR pszInstallPrefix = FREERDP_INSTALL_PREFIX;
|
||||
|
||||
cchLibraryPath = strlen(gLibraryPath);
|
||||
cchInstallPrefix = strlen(gInstallPrefix);
|
||||
cchLibraryPath = strlen(pszLibraryPath);
|
||||
cchInstallPrefix = strlen(pszInstallPrefix);
|
||||
|
||||
cchPath = cchInstallPrefix + cchLibraryPath + 2;
|
||||
pszPath = (LPSTR) malloc(cchPath + 1);
|
||||
|
||||
CopyMemory(pszPath, gInstallPrefix, cchInstallPrefix);
|
||||
CopyMemory(pszPath, pszInstallPrefix, cchInstallPrefix);
|
||||
pszPath[cchInstallPrefix] = '\0';
|
||||
|
||||
NativePathCchAppendA(pszPath, cchPath + 1, gLibraryPath);
|
||||
NativePathCchAppendA(pszPath, cchPath + 1, pszLibraryPath);
|
||||
|
||||
return pszPath;
|
||||
}
|
||||
@ -62,17 +61,19 @@ LPSTR freerdp_get_dynamic_addin_install_path()
|
||||
size_t cchPath;
|
||||
size_t cchAddinPath;
|
||||
size_t cchInstallPrefix;
|
||||
LPCSTR pszAddinPath = FREERDP_ADDIN_PATH;
|
||||
LPCSTR pszInstallPrefix = FREERDP_INSTALL_PREFIX;
|
||||
|
||||
cchAddinPath = strlen(gAddinPath);
|
||||
cchInstallPrefix = strlen(gInstallPrefix);
|
||||
cchAddinPath = strlen(pszAddinPath);
|
||||
cchInstallPrefix = strlen(pszInstallPrefix);
|
||||
|
||||
cchPath = cchInstallPrefix + cchAddinPath + 2;
|
||||
pszPath = (LPSTR) malloc(cchPath + 1);
|
||||
|
||||
CopyMemory(pszPath, gInstallPrefix, cchInstallPrefix);
|
||||
CopyMemory(pszPath, pszInstallPrefix, cchInstallPrefix);
|
||||
pszPath[cchInstallPrefix] = '\0';
|
||||
|
||||
NativePathCchAppendA(pszPath, cchPath + 1, gAddinPath);
|
||||
NativePathCchAppendA(pszPath, cchPath + 1, pszAddinPath);
|
||||
|
||||
return pszPath;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user