mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
Fix build of OpenSSL on Android (#4427)
When passing on CMAKE_<LANG>_COMPILER_TARGET and CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN it is important that the selection of those via CMAKE_C_COMPILE_OPTIONS_TARGET/EXTERNAL_TOOLCHAIN is done without a space inbetween. For example COMPILE_OPTIONS_TARGET is with clang a simple --target= and so the selected target must follow without a space, so that we get --target=foo-bar instead of --target= foo bar, which the compiler does not parse as intended.
This commit is contained in:
parent
8bb061a20c
commit
0e50a41922
@ -36,10 +36,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_TARGET)
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET} ${CMAKE_C_COMPILER_TARGET}")
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}")
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}")
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}")
|
||||
endif()
|
||||
if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user