cmake: Fix the shared build on Android

The ld version script should not be generated on Android.

Co-authored-by: Volker Krause <vkrause@kde.org>
Co-authored-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
Cosmin Truta 2022-09-10 23:50:49 +03:00
parent 763c77e628
commit dd8db8105c

View File

@ -223,9 +223,10 @@ set(CMAKE_DEBUG_POSTFIX "d")
include(CheckCSourceCompiles)
option(ld-version-script "Enable linker version script" ON)
if(ld-version-script AND NOT APPLE)
if(ld-version-script AND NOT ANDROID AND NOT APPLE)
# Check if LD supports linker scripts.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "
VERS_1 {
global: sym;
local: *;
};