-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (24 loc) · 1.13 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.26)
project(xvisio)
set(CMAKE_CXX_STANDARD 23)
add_library(xvisio SHARED src/device/device.cpp
src/xvisio.cpp
src/device/hid.cpp
src/slam.cpp
src/types/pose.cpp
)
target_compile_options(xvisio PRIVATE -Wno-deprecated-enum-enum-conversion)
target_include_directories(xvisio PRIVATE include/libxvisio/ include/libxvisio/device include/libxvisio/types)
add_executable(example example/main.cpp example/main.h)
target_compile_options(example PRIVATE -Wno-deprecated-enum-enum-conversion)
# libusb
find_package(PkgConfig REQUIRED)
pkg_check_modules(libUSB REQUIRED libusb-1.0)
target_link_libraries(xvisio ${libUSB_LINK_LIBRARIES})
target_include_directories(xvisio PUBLIC ${libUSB_INCLUDE_DIRS})
target_compile_options(xvisio PUBLIC ${libUSB_CFLAGS_OTHER})
target_link_libraries(example ${libUSB_LINK_LIBRARIES})
target_link_libraries(example xvisio)
target_include_directories(example PUBLIC ${libUSB_INCLUDE_DIRS})
target_include_directories(example PRIVATE include/libxvisio/ include/libxvisio/device include/libxvisio/types)
target_compile_options(example PUBLIC ${libUSB_CFLAGS_OTHER})