CMakeLists.txt 1.07 KB
Newer Older
1 2 3 4
# Copyright 2019, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0

######
5
# Create a cli interface for Monado.
6 7 8 9 10 11 12 13 14

include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}/../../targets/common
	${CMAKE_CURRENT_SOURCE_DIR}/../../auxiliary
	${CMAKE_CURRENT_SOURCE_DIR}/../../include
	${CMAKE_CURRENT_SOURCE_DIR}/../../drivers
	)

set(SOURCE_FILES
15
	cli_cmd_calibrate.c
16 17 18 19
	cli_cmd_test.c
	cli_common.h
	cli_main.c
	cli_prober.c
20 21 22 23 24 25 26 27 28 29 30 31
	)

add_executable(prober
	${SOURCE_FILES}
	$<TARGET_OBJECTS:aux_os>
	$<TARGET_OBJECTS:aux_util>
	$<TARGET_OBJECTS:aux_math>
	$<TARGET_OBJECTS:st_prober>
	$<TARGET_OBJECTS:target_lists>
	)

set_target_properties(prober PROPERTIES
32
	OUTPUT_NAME monado-cli
33 34 35 36 37 38 39 40 41
	PREFIX ""
	)

target_link_libraries(prober PRIVATE
	${LIBUSB_LIBRARIES}
	${LIBUVC_LIBRARIES}
	${UDEV_LIBRARIES}
	)

42 43
if(DRIVER_OBJECTS)
	target_sources(prober PRIVATE ${DRIVER_OBJECTS})
44 45 46 47 48
if(BUILD_DRIVER_SURVIVE)
	target_sources(prober PRIVATE $<TARGET_OBJECTS:drv_survive>)
	target_link_libraries(prober PRIVATE survive)
endif()

49 50
endif()

51 52
if(DRIVER_LIBRARIES)
	target_link_libraries(prober PRIVATE ${DRIVER_LIBRARIES})
53
endif()