From 1a9b549f9b06de4b4dc8f941dbc8989a6989d367 Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 16 Aug 2023 21:01:43 +0200 Subject: [PATCH] CMakeLists.txt: Link OpenMP statically on Android Signed-off-by: Username404 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bdef30..12f971e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,9 @@ if (${IS_GNU} OR ${IS_CLANG}) include(FindOpenMP) if (OpenMP_CXX_FOUND) set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") + if (ANDROID) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-openmp") + endif() add_definitions(-D_GLIBCXX_PARALLEL) endif() endif()