mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-02 20:08:29 +00:00
build: Use FindOpenHMD.
Fixes a gripe/todo in the build system, too :D
This commit is contained in:
parent
78007e4670
commit
eec53ca35d
|
@ -24,10 +24,7 @@ find_package(Eigen3 REQUIRED)
|
||||||
find_package(Vulkan REQUIRED)
|
find_package(Vulkan REQUIRED)
|
||||||
find_package(OpenGL REQUIRED COMPONENTS GLX)
|
find_package(OpenGL REQUIRED COMPONENTS GLX)
|
||||||
find_package(HIDAPI)
|
find_package(HIDAPI)
|
||||||
|
find_package(OpenHMD)
|
||||||
# Push into a FindOpenHMD.cmake file.
|
|
||||||
find_package(PkgConfig)
|
|
||||||
pkg_check_modules(OPENHMD openhmd)
|
|
||||||
|
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
|
|
@ -55,11 +55,6 @@ set(SOURCE_FILES
|
||||||
target.c
|
target.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Siiiiiiiigh, there is no target_link_directories
|
|
||||||
# or a way to add directories to a target.
|
|
||||||
link_directories(${OPENHMD_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
# depends on above generated files
|
# depends on above generated files
|
||||||
add_library(${RUNTIME_TARGET} SHARED
|
add_library(${RUNTIME_TARGET} SHARED
|
||||||
${MANIFEST_DEV_PATH}
|
${MANIFEST_DEV_PATH}
|
||||||
|
@ -73,7 +68,8 @@ add_library(${RUNTIME_TARGET} SHARED
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${RUNTIME_TARGET}
|
target_link_libraries(${RUNTIME_TARGET}
|
||||||
${OPENHMD_LIBRARIES}
|
PUBLIC
|
||||||
|
OpenHMD::OpenHMD
|
||||||
${Vulkan_LIBRARIES}
|
${Vulkan_LIBRARIES}
|
||||||
${XCB_LIBRARIES}
|
${XCB_LIBRARIES}
|
||||||
OpenGL::GLX
|
OpenGL::GLX
|
||||||
|
@ -83,7 +79,7 @@ target_compile_definitions(${RUNTIME_TARGET} PRIVATE XRT_HAVE_OHMD)
|
||||||
|
|
||||||
if(TARGET drv_hdk)
|
if(TARGET drv_hdk)
|
||||||
target_sources(${RUNTIME_TARGET} PRIVATE $<TARGET_OBJECTS:drv_hdk>)
|
target_sources(${RUNTIME_TARGET} PRIVATE $<TARGET_OBJECTS:drv_hdk>)
|
||||||
target_link_libraries(${RUNTIME_TARGET} ${HIDAPI_LIBRARIES})
|
target_link_libraries(${RUNTIME_TARGET} PUBLIC ${HIDAPI_LIBRARIES})
|
||||||
target_compile_definitions(${RUNTIME_TARGET} PRIVATE XRT_HAVE_HDK)
|
target_compile_definitions(${RUNTIME_TARGET} PRIVATE XRT_HAVE_HDK)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue