Pull in libepoll-shim for the bits that require timerfd/epoll
libepoll-shim is our implementation of this API on top of kevent. It supplies the same headers and a library, but we don't install it in any of the default include search paths when it comes in through ports on an as-needed basis. This set of changes is restricted to FREEBSD-compatible OS, which includes DragonflyBSD and FreeBSD.
This commit is contained in:
parent
5e9c8c4bca
commit
45d8e2dfb2
@ -203,6 +203,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
|
|||||||
set(FREEBSD TRUE)
|
set(FREEBSD TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(FREEBSD)
|
||||||
|
find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
|
||||||
|
find_library(EPOLLSHIM_LIBS NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Configure MSVC Runtime
|
# Configure MSVC Runtime
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
include(MSVCRuntime)
|
include(MSVCRuntime)
|
||||||
@ -653,7 +658,13 @@ if(UNIX OR CYGWIN)
|
|||||||
if (HAVE_SYS_EVENTFD_H)
|
if (HAVE_SYS_EVENTFD_H)
|
||||||
check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE)
|
check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE)
|
||||||
endif()
|
endif()
|
||||||
|
if (FREEBSD)
|
||||||
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
check_include_files(sys/timerfd.h HAVE_SYS_TIMERFD_H)
|
check_include_files(sys/timerfd.h HAVE_SYS_TIMERFD_H)
|
||||||
|
if (FREEBSD)
|
||||||
|
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
check_include_files(poll.h HAVE_POLL_H)
|
check_include_files(poll.h HAVE_POLL_H)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES m)
|
list(APPEND CMAKE_REQUIRED_LIBRARIES m)
|
||||||
check_symbol_exists(ceill math.h HAVE_MATH_C99_LONG_DOUBLE)
|
check_symbol_exists(ceill math.h HAVE_MATH_C99_LONG_DOUBLE)
|
||||||
|
@ -40,6 +40,9 @@ generate_protocol_file(xdg-shell)
|
|||||||
generate_protocol_file(ivi-application)
|
generate_protocol_file(ivi-application)
|
||||||
generate_protocol_file(fullscreen-shell)
|
generate_protocol_file(fullscreen-shell)
|
||||||
|
|
||||||
|
if(FREEBSD)
|
||||||
|
include_directories(${EPOLLSHIM_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
include_directories(${WAYLAND_INCLUDE_DIR})
|
include_directories(${WAYLAND_INCLUDE_DIR})
|
||||||
include_directories(${XKBCOMMON_INCLUDE_DIR})
|
include_directories(${XKBCOMMON_INCLUDE_DIR})
|
||||||
include_directories("${CMAKE_SOURCE_DIR}/uwac/include")
|
include_directories("${CMAKE_SOURCE_DIR}/uwac/include")
|
||||||
@ -69,7 +72,7 @@ if (WITH_LIBRARY_VERSIONING)
|
|||||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${UWAC_VERSION} SOVERSION ${UWAC_API_VERSION})
|
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${UWAC_VERSION} SOVERSION ${UWAC_API_VERSION})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${PRIVATE_KEYWORD} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} freerdp)
|
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${PRIVATE_KEYWORD} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} ${EPOLLSHIM_LIBS} freerdp)
|
||||||
|
|
||||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT uwac)
|
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT uwac)
|
||||||
|
|
||||||
|
@ -30,6 +30,11 @@ winpr_module_add(
|
|||||||
timer.c
|
timer.c
|
||||||
wait.c)
|
wait.c)
|
||||||
|
|
||||||
|
if(FREEBSD)
|
||||||
|
winpr_include_directory_add(${EPOLLSHIM_INCLUDE_DIR})
|
||||||
|
winpr_library_add(${EPOLLSHIM_LIBS})
|
||||||
|
endif()
|
||||||
|
|
||||||
if((NOT WIN32) AND (NOT APPLE) AND (NOT ANDROID) AND (NOT OPENBSD))
|
if((NOT WIN32) AND (NOT APPLE) AND (NOT ANDROID) AND (NOT OPENBSD))
|
||||||
winpr_library_add(rt)
|
winpr_library_add(rt)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user