mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:53:02 +08:00
Fix android toolchain so it correctly adds -fPIC flag (#12097)
(cherry picked from commit 497fe8ab805bcafd2cb2abd538db8783f897f9ad)
This commit is contained in:
parent
e299457351
commit
a17543d840
@ -39,14 +39,14 @@ if(NOT _VCPKG_ANDROID_TOOLCHAIN)
|
|||||||
set(_VCPKG_ANDROID_TOOLCHAIN 1)
|
set(_VCPKG_ANDROID_TOOLCHAIN 1)
|
||||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||||
if(NOT _CMAKE_IN_TRY_COMPILE)
|
if(NOT _CMAKE_IN_TRY_COMPILE)
|
||||||
string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ")
|
string(APPEND CMAKE_C_FLAGS " -fPIC ${VCPKG_C_FLAGS} ")
|
||||||
string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ")
|
string(APPEND CMAKE_CXX_FLAGS " -fPIC ${VCPKG_CXX_FLAGS} ")
|
||||||
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ")
|
string(APPEND CMAKE_C_FLAGS_DEBUG " ${VCPKG_C_FLAGS_DEBUG} ")
|
||||||
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ")
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG " ${VCPKG_CXX_FLAGS_DEBUG} ")
|
||||||
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ")
|
string(APPEND CMAKE_C_FLAGS_RELEASE " ${VCPKG_C_FLAGS_RELEASE} ")
|
||||||
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ")
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE " ${VCPKG_CXX_FLAGS_RELEASE} ")
|
||||||
|
|
||||||
string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ")
|
string(APPEND CMAKE_SHARED_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ")
|
||||||
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ")
|
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user