-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
81 lines (63 loc) · 2.48 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
74
75
76
77
78
cmake_minimum_required(VERSION 3.14)
option(CROSSCOMPILE_ARM "Cross compiling for arm architecture" OFF)
if(CROSSCOMPILE_ARM)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/arm_build.cmake)
endif()
project(coin VERSION 0.1.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(FetchContent)
find_package(GeometryTools)
if (NOT ${GeometryTools_FOUND})
message("'GeometryTools' not found on local installation, retrieveing it from Github.")
FetchContent_Declare(
GeometryTools
GIT_REPOSITORY https://github.com/rustyducks/geometry_tools.git
GIT_TAG main
)
FetchContent_MakeAvailable(GeometryTools)
endif()
find_package(Navigation)
if (NOT ${Navigation_FOUND})
message("'Navigation' not found on local installation, retrieveing it from Github.")
FetchContent_Declare(
Navigation
GIT_REPOSITORY https://github.com/rustyducks/navigation.git
GIT_TAG main
)
FetchContent_MakeAvailable(Navigation)
endif()
# find_package(NoWay)
# if (NOT ${NoWay_FOUND})
# message("'NoWay' not found on local installation, retrieveing it from Github.")
# FetchContent_Declare(
# NoWay
# GIT_REPOSITORY https://github.com/rustyducks/NoWay.git
# GIT_TAG master
# )
# FetchContent_MakeAvailable(NoWay)
# endif()
find_package(Ducklink)
find_package(Protoduck)
if (NOT ${Ducklink_FOUND})
message("'Ducklink' not found on local installation, retrieveing it from Github.")
FetchContent_Declare(
Ducklink
GIT_REPOSITORY https://github.com/rustyducks/ducklink_cpp.git
GIT_TAG master
)
FetchContent_MakeAvailable(Ducklink)
endif()
file(GLOB_RECURSE CoinDalek_SRC CONFIGURE_DEPENDS "src/*.cpp" EXC)
list(FILTER CoinDalek_SRC EXCLUDE REGEX ".*src/mainCrolonome\.cpp$")
file(GLOB_RECURSE CoinCrolonome_SRC CONFIGURE_DEPENDS "src/*.cpp" EXC)
list(FILTER CoinCrolonome_SRC EXCLUDE REGEX ".*src/mainDalek\.cpp$")
add_executable(CoinDalek ${CoinDalek_SRC})
target_include_directories(CoinDalek PUBLIC include)
target_link_libraries(CoinDalek PUBLIC GeometryTools Navigation Ducklink Protoduck)
set_target_properties(CoinDalek PROPERTIES CXX_STANDARD 14)
target_compile_options(CoinDalek PRIVATE -Wall -Wextra -Wpedantic -Werror)
add_executable(CoinCrolonome ${CoinCrolonome_SRC})
target_include_directories(CoinCrolonome PUBLIC include)
target_link_libraries(CoinCrolonome PUBLIC GeometryTools Navigation Ducklink Protoduck)
set_target_properties(CoinCrolonome PROPERTIES CXX_STANDARD 14)
target_compile_options(CoinCrolonome PRIVATE -Wall -Wextra -Wpedantic -Werror)