CMakeLists.txt: Link OpenMP statically on Android

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2023-08-16 21:01:43 +02:00
parent 8a7f556520
commit 1a9b549f9b
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 0 deletions

View File

@ -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()