mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-28 01:18:31 +00:00
build: Be able to build against pthreads4w
This commit is contained in:
parent
7e600dd244
commit
6ad46cb1b2
|
@ -36,12 +36,21 @@ find_package(Libusb1)
|
|||
find_package(JPEG)
|
||||
find_package(realsense2 CONFIG)
|
||||
find_package(SDL2 CONFIG)
|
||||
find_package(Threads)
|
||||
find_package(ZLIB)
|
||||
find_package(cJSON)
|
||||
find_package(Systemd)
|
||||
find_package(OpenGLES COMPONENTS V3)
|
||||
|
||||
add_library(xrt-pthreads INTERFACE)
|
||||
if(WIN32)
|
||||
find_package(pthreads_windows REQUIRED)
|
||||
target_link_libraries(xrt-pthreads INTERFACE PThreads4W::PThreads4W_CXXEXC)
|
||||
else()
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
||||
find_package(Threads)
|
||||
target_link_libraries(xrt-pthreads INTERFACE Threads::Threads)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
# @TODO Turn into a find_package LIBUVC file.
|
||||
pkg_check_modules(LIBUVC libuvc)
|
||||
|
|
|
@ -156,7 +156,7 @@ endif()
|
|||
|
||||
# OS library.
|
||||
add_library(aux_os STATIC ${OS_SOURCE_FILES})
|
||||
target_link_libraries(aux_os PUBLIC aux-includes PRIVATE Threads::Threads)
|
||||
target_link_libraries(aux_os PUBLIC aux-includes xrt-pthreads)
|
||||
if(XRT_HAVE_DBUS)
|
||||
target_link_libraries(aux_os PRIVATE ${DBUS_LIBRARIES})
|
||||
target_include_directories(aux_os SYSTEM
|
||||
|
|
Loading…
Reference in a new issue