Skip to content

Commit

Permalink
build: try fix AppleSilicon build
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Nov 18, 2024
1 parent c642622 commit 7275cea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,16 @@ include(StaticAnalyzers)

ucm_print_flags()

find_package(Threads)
if(APPLE)
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm64")
message("Adding missing Threads workaround")
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)
endif()
endif()

find_package(
QT
Expand Down

0 comments on commit 7275cea

Please sign in to comment.