2019-04-30 13:33:34 +00:00
|
|
|
# Copyright 2019, Collabora, Ltd.
|
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../include
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../auxiliary
|
2019-09-02 12:25:52 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../drivers
|
2019-04-30 13:33:34 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../../external
|
|
|
|
)
|
|
|
|
|
2019-06-20 17:02:28 +00:00
|
|
|
set(PROBER_INCLUDES)
|
|
|
|
|
2019-04-30 13:33:34 +00:00
|
|
|
set(PROBER_SOURCE_FILES
|
|
|
|
p_documentation.h
|
|
|
|
p_dump.c
|
|
|
|
p_prober.c
|
|
|
|
p_prober.h
|
2019-09-21 18:08:26 +00:00
|
|
|
p_tracking.c
|
2019-04-30 13:33:34 +00:00
|
|
|
)
|
|
|
|
|
2019-06-20 17:02:28 +00:00
|
|
|
# Add libudev
|
|
|
|
if(BUILD_WITH_LIBUDEV)
|
|
|
|
list(APPEND PROBER_SOURCE_FILES
|
|
|
|
p_udev.c
|
|
|
|
)
|
|
|
|
list(APPEND PROBER_INCLUDES
|
|
|
|
${LIBUDEV_INCLUDES}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-06-20 13:51:34 +00:00
|
|
|
# Add libusb
|
|
|
|
if(BUILD_WITH_LIBUSB)
|
|
|
|
list(APPEND PROBER_SOURCE_FILES
|
|
|
|
p_libusb.c
|
|
|
|
)
|
|
|
|
list(APPEND PROBER_INCLUDES
|
|
|
|
${LIBUSB_INCLUDES}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-06-20 14:14:09 +00:00
|
|
|
# Add libuvc
|
|
|
|
if(BUILD_WITH_LIBUVC)
|
|
|
|
list(APPEND PROBER_SOURCE_FILES
|
|
|
|
p_libuvc.c
|
|
|
|
)
|
|
|
|
list(APPEND PROBER_INCLUDES
|
|
|
|
${LIBUVC_INCLUDES}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-04-30 13:33:34 +00:00
|
|
|
# Use OBJECT to not create a archive, since it just gets in the way.
|
|
|
|
add_library(st_prober OBJECT ${PROBER_SOURCE_FILES})
|
|
|
|
|
|
|
|
target_include_directories(st_prober
|
|
|
|
PRIVATE
|
2019-06-20 17:02:28 +00:00
|
|
|
${PROBER_INCLUDES}
|
2019-04-30 13:33:34 +00:00
|
|
|
)
|