mirror of
https://git.freebsd.org/ports.git
synced 2025-05-01 11:06:39 -04:00
In preparation of the following net-p2p/transmission update. The library must be updated in lockstep. PR: 269504 Reported by: dutchman01@quicknet.nl Approved by: rigoletto, tcberner (maintainer timeout) Reviewed By: fcharlier_ploup.net Differential Revision: https://reviews.freebsd.org/D40910
25 lines
740 B
Text
25 lines
740 B
Text
--- CMakeLists.txt.orig 2023-08-04 09:40:52 UTC
|
|
+++ CMakeLists.txt
|
|
@@ -56,6 +56,13 @@ if(WIN32)
|
|
libutp_inet_ntop.h)
|
|
endif()
|
|
|
|
+if(CMAKE_VERSION VERSION_LESS 3.25)
|
|
+ set(BSD OFF)
|
|
+ if(CMAKE_SYSTEM_NAME MATCHES "BSD")
|
|
+ set(BSD ON)
|
|
+ endif()
|
|
+ endif()
|
|
+
|
|
add_library(libutp ${LIBUTP_LIBRARY_TYPE}
|
|
include/libutp/utp.h
|
|
include/libutp/utp_types.h
|
|
@@ -118,7 +125,7 @@ if(LIBUTP_BUILD_PROGRAMS AND NOT MSVC)
|
|
|
|
target_compile_definitions(ucat
|
|
PRIVATE
|
|
- $<$<NOT:$<BOOL:${WIN32}>>:_POSIX_C_SOURCE=200112L>
|
|
+ $<$<NOT:$<OR:$<BOOL:${WIN32}>,$<BOOL:${BSD}>>>:_POSIX_C_SOURCE=200112L>
|
|
$<$<BOOL:${APPLE}>:_DARWIN_C_SOURCE>)
|
|
|
|
target_link_libraries(ucat
|