-
Notifications
You must be signed in to change notification settings - Fork 38
/
CMakeLists.txt
73 lines (61 loc) · 1.45 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
cmake_minimum_required(VERSION 3.5)
project(crazyflie_cpp VERSION 0.0.1)
find_library(USB_LIB usb-1.0)
# Enable C++11 and warnings
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_compile_options(-Wall -Wextra -Werror)
add_library(crazyflie_cpp
src/Crazyflie.cpp
src/CrazyflieUSB.cpp
src/Crazyradio.cpp
src/crtp.cpp
src/USBDevice.cpp
src/ITransport.cpp
)
target_include_directories(crazyflie_cpp
PUBLIC
$<INSTALL_INTERFACE:include/crazyflie_cpp>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/crazyflie_cpp>
)
target_link_libraries(crazyflie_cpp
PRIVATE
${USB_LIB}
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
crazyflie_cpp-config-version.cmake
VERSION ${CRAZYFLIE_CPP_VERSION}
COMPATIBILITY AnyNewerVersion
)
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/crazyflie_cpp
DESTINATION include
)
install(
TARGETS crazyflie_cpp
EXPORT crazyflie_cpp-targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(EXPORT crazyflie_cpp-targets
FILE crazyflie_cpp-targets.cmake
NAMESPACE crazyflie_cpp::
DESTINATION lib/cmake/crazyflie_cpp
)
install(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/crazyflie_cpp-config.cmake"
DESTINATION
lib/cmake/crazyflie_cpp
)
# Install ROS package information
install(
FILES
package.xml
DESTINATION
share/crazyflie_cpp
)