diff --git a/src/xrt/targets/CMakeLists.txt b/src/xrt/targets/CMakeLists.txt index c65842fceb2cc16153102876e4e1b64ae83b4e2c..872b44dd81896a4db74ce212f365b9d2af9a8dfe 100644 --- a/src/xrt/targets/CMakeLists.txt +++ b/src/xrt/targets/CMakeLists.txt @@ -29,6 +29,43 @@ if(BUILD_DRIVER_PSVR) list(APPEND DRIVER_LIBRARIES ${HIDAPI_LIBRARIES}) endif() +if(BUILD_DRIVER_MONTRACK) + list(APPEND DRIVER_OBJECTS + $<TARGET_OBJECTS:drv_montrack> + $<TARGET_OBJECTS:frameserver> + $<TARGET_OBJECTS:filter> + $<TARGET_OBJECTS:optical_tracking>) + if(BUILD_WITH_LIBUVC AND BUILD_WITH_JPEG) + list(APPEND DRIVER_LIBRARIES + ${libuvc_LIBRARIES} + ${LIBUSB1_LIBRARIES}) + endif() + if(BUILD_WITH_JPEG) + list(APPEND DRIVER_LIBRARIES + ${JPEG_LIBRARIES}) + endif() + if(BUILD_WITH_FFMPEG) + list(APPEND DRIVER_LIBRARIES + avformat # TODO find rather than hard code! + avcodec # TODO find rather than hard code! + avutil # TODO find rather than hard code! + ) + endif() + if(BUILD_WITH_UVBI) + list(APPEND DRIVER_LIBRARIES + uvbi::uvbi_plugin_parts) + endif() + list(APPEND DRIVER_LIBRARIES + opencv_core + opencv_calib3d + opencv_highgui + opencv_imgproc + opencv_imgcodecs + opencv_features2d + opencv_video + ) +endif() + add_subdirectory(common) add_subdirectory(openxr) -#add_subdirectory(prober) +# add_subdirectory(prober) diff --git a/src/xrt/targets/openxr/CMakeLists.txt b/src/xrt/targets/openxr/CMakeLists.txt index 675941b9cdbb444ef0d2f31cbaf4e4afd35ed996..cc9892f499c7d90b805a19a22d76a7450ca09c43 100644 --- a/src/xrt/targets/openxr/CMakeLists.txt +++ b/src/xrt/targets/openxr/CMakeLists.txt @@ -89,48 +89,6 @@ if(DRIVER_LIBRARIES) target_link_libraries(${RUNTIME_TARGET} PRIVATE ${DRIVER_LIBRARIES}) endif() -if(BUILD_DRIVER_MONTRACK) - target_sources(${RUNTIME_TARGET} PRIVATE - $<TARGET_OBJECTS:drv_montrack> - $<TARGET_OBJECTS:frameserver> - $<TARGET_OBJECTS:filter> - $<TARGET_OBJECTS:optical_tracking>) - if(BUILD_WITH_LIBUVC AND BUILD_WITH_JPEG) - target_link_libraries(${RUNTIME_TARGET} - PUBLIC - ${libuvc_LIBRARIES} - ${LIBUSB1_LIBRARIES}) - endif() - if(BUILD_WITH_JPEG) - target_link_libraries(${RUNTIME_TARGET} - PUBLIC - ${JPEG_LIBRARIES}) - endif() - if(BUILD_WITH_FFMPEG) - target_link_libraries(${RUNTIME_TARGET} - PUBLIC - avformat # TODO find rather than hard code! - avcodec # TODO find rather than hard code! - avutil # TODO find rather than hard code! - ) - endif() - if(BUILD_WITH_UVBI) - target_link_libraries(${RUNTIME_TARGET} - PUBLIC - uvbi::uvbi_plugin_parts) - endif() - target_link_libraries(${RUNTIME_TARGET} - PUBLIC - jpeg # TODO find rather than hard code! - opencv_core - opencv_calib3d - opencv_highgui - opencv_imgproc - opencv_imgcodecs - opencv_features2d - opencv_video - ) -endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") include(GNUInstallDirs) install(TARGETS ${RUNTIME_TARGET}