Skip to content

Commit e43b5d6

Browse files
committed
build: Set CMAKE_THREAD_PREFER_PTHREAD
Needed for FreeBSD 14.4 support
1 parent f085df1 commit e43b5d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ else()
1313
set(CMAKE_C_STANDARD_REQUIRED OFF)
1414
endif()
1515

16+
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
17+
find_package(Threads REQUIRED)
18+
1619
option(ENABLE_API "Build API support." ON)
1720

1821
include(GNUInstallDirs)
@@ -58,7 +61,6 @@ if(ENABLE_API)
5861
pkg_check_modules(MICROHTTPD REQUIRED libmicrohttpd)
5962
endif()
6063
pkg_check_modules(SODIUM REQUIRED libsodium)
61-
find_package(Threads REQUIRED)
6264

6365
include(CheckFunctionExists)
6466
include(CheckLibraryExists)

0 commit comments

Comments
 (0)