2020-03-05 11:41:06 +00:00
|
|
|
# Copyright 2019-2020, Collabora, Ltd.
|
2019-03-18 05:52:32 +00:00
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
|
|
|
set(MATH_SOURCE_FILES
|
|
|
|
math/m_api.h
|
|
|
|
math/m_base.cpp
|
2019-11-21 13:15:38 +00:00
|
|
|
math/m_eigen_interop.hpp
|
2020-02-18 12:48:57 +00:00
|
|
|
math/m_filter_fifo.c
|
|
|
|
math/m_filter_fifo.h
|
2019-04-01 16:10:41 +00:00
|
|
|
math/m_hash.cpp
|
2020-03-13 19:56:47 +00:00
|
|
|
math/m_imu_3dof.c
|
|
|
|
math/m_imu_3dof.h
|
2020-01-29 20:50:42 +00:00
|
|
|
math/m_imu_pre.c
|
|
|
|
math/m_imu_pre.h
|
2019-04-01 16:10:41 +00:00
|
|
|
math/m_optics.c
|
2019-03-18 05:52:32 +00:00
|
|
|
math/m_quatexpmap.cpp
|
2019-11-21 13:15:38 +00:00
|
|
|
math/m_vec2.h
|
2020-01-27 06:31:56 +00:00
|
|
|
math/m_vec3.h
|
2019-03-18 05:52:32 +00:00
|
|
|
)
|
|
|
|
|
2019-10-09 15:39:38 +00:00
|
|
|
set(OGL_SOURCE_FILES
|
|
|
|
ogl/ogl_api.c
|
|
|
|
ogl/ogl_api.h
|
|
|
|
ogl/ogl_documentation.h
|
|
|
|
)
|
|
|
|
|
2019-05-03 14:47:45 +00:00
|
|
|
set(OS_SOURCE_FILES
|
2020-03-05 11:38:01 +00:00
|
|
|
os/os_ble.h
|
2019-05-03 14:47:45 +00:00
|
|
|
os/os_documentation.h
|
|
|
|
os/os_hid.h
|
|
|
|
os/os_hid_hidraw.c
|
2019-09-13 18:34:10 +00:00
|
|
|
os/os_threading.h
|
2019-05-03 14:47:45 +00:00
|
|
|
)
|
2020-03-05 11:38:01 +00:00
|
|
|
if(BUILD_WITH_DBUS)
|
|
|
|
list(APPEND OS_SOURCE_FILES
|
|
|
|
os/os_ble_dbus.c
|
|
|
|
)
|
|
|
|
endif()
|
2019-05-03 14:47:45 +00:00
|
|
|
|
2019-07-23 16:29:14 +00:00
|
|
|
set(TRACKING_SOURCE_FILES
|
2020-03-10 13:27:43 +00:00
|
|
|
tracking/t_data_utils.c
|
2019-11-21 13:00:52 +00:00
|
|
|
tracking/t_imu_fusion.hpp
|
2019-12-03 21:48:36 +00:00
|
|
|
tracking/t_imu.cpp
|
|
|
|
tracking/t_imu.h
|
2019-11-21 13:00:52 +00:00
|
|
|
tracking/t_lowpass_vector.hpp
|
2019-12-03 21:48:36 +00:00
|
|
|
tracking/t_lowpass.hpp
|
2019-07-23 16:29:14 +00:00
|
|
|
tracking/t_tracking.h
|
|
|
|
)
|
2019-12-03 21:48:36 +00:00
|
|
|
if(BUILD_TRACKING)
|
|
|
|
list(APPEND TRACKING_SOURCE_FILES
|
|
|
|
tracking/t_calibration_opencv.hpp
|
|
|
|
tracking/t_calibration.cpp
|
|
|
|
tracking/t_convert.cpp
|
|
|
|
tracking/t_debug_hsv_filter.cpp
|
|
|
|
tracking/t_debug_hsv_picker.cpp
|
|
|
|
tracking/t_debug_hsv_viewer.cpp
|
|
|
|
tracking/t_file.cpp
|
|
|
|
tracking/t_fusion.hpp
|
2020-01-14 18:18:08 +00:00
|
|
|
tracking/t_helper_debug_sink.hpp
|
2019-12-03 21:48:36 +00:00
|
|
|
tracking/t_hsv_filter.c
|
|
|
|
tracking/t_kalman.cpp
|
|
|
|
tracking/t_tracker_psmv_fusion.hpp
|
|
|
|
tracking/t_tracker_psmv.cpp
|
|
|
|
tracking/t_tracker_psvr.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2019-07-23 16:29:14 +00:00
|
|
|
|
2019-05-07 15:08:22 +00:00
|
|
|
set(UTIL_SOURCE_FILES
|
2020-03-05 11:41:06 +00:00
|
|
|
util/u_bitwise.c
|
|
|
|
util/u_bitwise.h
|
2019-03-18 05:52:32 +00:00
|
|
|
util/u_misc.c
|
|
|
|
util/u_misc.h
|
|
|
|
util/u_debug.c
|
|
|
|
util/u_debug.h
|
|
|
|
util/u_device.c
|
|
|
|
util/u_device.h
|
2019-10-22 17:45:25 +00:00
|
|
|
util/u_distortion_mesh.c
|
|
|
|
util/u_distortion_mesh.h
|
2019-04-06 11:28:56 +00:00
|
|
|
util/u_documentation.h
|
2020-04-06 10:08:48 +00:00
|
|
|
util/u_file.c
|
|
|
|
util/u_file.h
|
2019-07-22 21:41:03 +00:00
|
|
|
util/u_format.c
|
|
|
|
util/u_format.h
|
2019-08-22 13:15:41 +00:00
|
|
|
util/u_frame.c
|
|
|
|
util/u_frame.h
|
2019-05-07 15:03:38 +00:00
|
|
|
util/u_hashmap.cpp
|
|
|
|
util/u_hashmap.h
|
2019-04-06 11:33:01 +00:00
|
|
|
util/u_hashset.cpp
|
|
|
|
util/u_hashset.h
|
2019-11-08 11:25:36 +00:00
|
|
|
util/u_json.c
|
|
|
|
util/u_json.h
|
2019-07-23 12:38:58 +00:00
|
|
|
util/u_sink.h
|
2019-08-22 13:15:41 +00:00
|
|
|
util/u_sink_converter.c
|
2020-01-18 20:59:38 +00:00
|
|
|
util/u_sink_deinterleaver.c
|
2019-08-22 13:15:41 +00:00
|
|
|
util/u_sink_queue.c
|
2020-01-17 14:17:54 +00:00
|
|
|
util/u_sink_quirk.c
|
2019-09-03 09:07:20 +00:00
|
|
|
util/u_sink_split.c
|
2019-03-18 05:52:32 +00:00
|
|
|
util/u_time.cpp
|
|
|
|
util/u_time.h
|
2019-08-31 11:46:25 +00:00
|
|
|
util/u_var.cpp
|
|
|
|
util/u_var.h
|
2019-03-18 05:52:32 +00:00
|
|
|
)
|
|
|
|
|
2020-02-23 12:30:26 +00:00
|
|
|
set(VK_SOURCE_FILES
|
|
|
|
vk/vk_helpers.c
|
|
|
|
vk/vk_helpers.h
|
|
|
|
vk/vk_documentation.h
|
|
|
|
)
|
|
|
|
|
2019-03-18 05:52:32 +00:00
|
|
|
# Common includes
|
2020-03-03 23:24:39 +00:00
|
|
|
add_library(aux-includes INTERFACE)
|
|
|
|
target_include_directories(aux-includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
target_link_libraries(aux-includes INTERFACE xrt-interfaces)
|
2019-03-18 05:52:32 +00:00
|
|
|
|
2020-03-31 19:59:02 +00:00
|
|
|
if(BUILD_WITH_OPENGL)
|
|
|
|
# OpenGL library.
|
|
|
|
add_library(aux_ogl STATIC ${OGL_SOURCE_FILES})
|
|
|
|
target_link_libraries(aux_ogl PUBLIC aux-includes)
|
|
|
|
# for GLAD
|
|
|
|
target_link_libraries(aux_ogl PUBLIC xrt-external-glad)
|
|
|
|
endif()
|
2019-10-09 15:39:38 +00:00
|
|
|
|
2019-05-03 14:47:45 +00:00
|
|
|
# OS library.
|
2020-03-03 23:24:39 +00:00
|
|
|
add_library(aux_os STATIC ${OS_SOURCE_FILES})
|
|
|
|
target_link_libraries(aux_os PUBLIC aux-includes PRIVATE Threads::Threads)
|
2020-03-05 11:38:01 +00:00
|
|
|
if(BUILD_WITH_DBUS)
|
|
|
|
target_link_libraries(aux_os PRIVATE ${DBUS_LIBRARIES})
|
|
|
|
target_include_directories(aux_os SYSTEM
|
|
|
|
PRIVATE
|
|
|
|
${DBUS_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
endif()
|
2019-05-03 14:47:45 +00:00
|
|
|
|
2019-05-07 15:08:22 +00:00
|
|
|
# Math library.
|
2020-03-03 23:24:39 +00:00
|
|
|
add_library(aux_math STATIC ${MATH_SOURCE_FILES})
|
|
|
|
target_link_libraries(aux_math PUBLIC aux-includes)
|
2019-03-18 05:52:32 +00:00
|
|
|
|
2019-05-07 15:08:22 +00:00
|
|
|
# Math files has extra include(s).
|
2019-03-18 05:52:32 +00:00
|
|
|
target_include_directories(aux_math SYSTEM
|
|
|
|
PRIVATE ${EIGEN3_INCLUDE_DIR}
|
|
|
|
)
|
2019-07-23 16:29:14 +00:00
|
|
|
|
2020-03-04 23:25:27 +00:00
|
|
|
# Util library.
|
|
|
|
add_library(aux_util STATIC ${UTIL_SOURCE_FILES})
|
|
|
|
target_link_libraries(aux_util PUBLIC aux-includes)
|
|
|
|
# for u_device
|
|
|
|
target_link_libraries(aux_util PUBLIC aux_math)
|
|
|
|
if(BUILD_WITH_JPEG)
|
|
|
|
target_link_libraries(aux_util PRIVATE ${JPEG_LIBRARIES})
|
|
|
|
endif()
|
2020-03-31 19:58:04 +00:00
|
|
|
# for cJSON
|
|
|
|
if(BUILD_WITH_SYSTEM_CJSON)
|
|
|
|
target_link_libraries(aux_util PUBLIC cJSON::cJSON)
|
|
|
|
target_compile_definitions(aux_util PRIVATE XRT_USE_SYSTEM_CJSON)
|
2020-03-31 19:59:02 +00:00
|
|
|
else()
|
|
|
|
target_link_libraries(aux_util PUBLIC xrt-external-cjson)
|
2020-03-31 19:58:04 +00:00
|
|
|
endif()
|
2020-03-04 23:25:27 +00:00
|
|
|
|
2019-12-03 21:48:36 +00:00
|
|
|
# Tracking library.
|
2020-03-03 23:24:39 +00:00
|
|
|
add_library(aux_tracking STATIC ${TRACKING_SOURCE_FILES})
|
|
|
|
target_link_libraries(aux_tracking PUBLIC aux-includes PRIVATE aux_math)
|
2019-07-23 16:29:14 +00:00
|
|
|
|
2019-12-03 21:48:36 +00:00
|
|
|
# Tracking files have extra includes.
|
|
|
|
target_include_directories(aux_tracking SYSTEM
|
|
|
|
PRIVATE
|
|
|
|
${EIGEN3_INCLUDE_DIR}
|
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
# for flexkalman
|
2020-03-31 19:59:02 +00:00
|
|
|
target_link_libraries(aux_tracking PRIVATE xrt-external-flexkalman)
|
2019-07-23 16:29:14 +00:00
|
|
|
if(BUILD_TRACKING)
|
|
|
|
target_include_directories(aux_tracking SYSTEM
|
|
|
|
PRIVATE
|
|
|
|
${OpenCV_INCLUDE_DIRS}
|
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(aux_tracking PUBLIC ${OpenCV_LIBRARIES})
|
2019-07-23 16:29:14 +00:00
|
|
|
endif()
|
2020-02-23 12:30:26 +00:00
|
|
|
|
|
|
|
# Vulkan library.
|
2020-03-03 23:24:39 +00:00
|
|
|
add_library(aux_vk STATIC ${VK_SOURCE_FILES})
|
|
|
|
target_link_libraries(aux_vk PUBLIC aux-includes)
|
|
|
|
target_link_libraries(aux_vk PUBLIC Vulkan::Vulkan)
|