-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathCMakeLists.txt
71 lines (57 loc) · 2.73 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
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(gz-tools2 VERSION 2.0.1)
#============================================================================
# Find gz-cmake
#============================================================================
find_package(gz-cmake3 QUIET)
if (${gz-cmake3_FOUND})
set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})
else()
find_package(gz-cmake4 QUIET)
if (${gz-cmake4_FOUND})
set(GZ_CMAKE_VER ${gz-cmake4_VERSION_MAJOR})
else()
message(FATAL_ERROR "Could not find either gz-cmake3 or gz-cmake4")
endif()
endif()
#============================================================================
# Configure the project
#============================================================================
gz_configure_project(VERSION_SUFFIX)
#============================================================================
# Set project-specific options
#============================================================================
# No project-specific options yet
#============================================================================
# Search for project-specific dependencies
#============================================================================
message(STATUS "\n\n-- ====== Finding Dependencies ======")
# Rubocop for Ruby linting
find_program(RUBOCOP_PROGRAM rubocop)
# Backtrace
# There appears to be a bug that causes pretty printing backtrace to fail in
# some instances when using BFD, so we disable it here.
option(USE_SYSTEM_BACKWARDCPP "Use system installed backward-cpp, otherwise use vendored version" FALSE)
if (NOT USE_SYSTEM_BACKWARDCPP)
list(APPEND CMAKE_PREFIX_PATH ${PROJECT_SOURCE_DIR}/src/Backward)
set(STACK_DETAILS_AUTO_DETECT FALSE CACHE BOOL "Auto detect backward's stack details dependencies")
endif()
find_package(Backward)
add_subdirectory(etc)
#============================================================================
# Configure the build
#============================================================================
gz_configure_build(QUIT_IF_BUILD_ERRORS)
#============================================================================
# Create package information
#============================================================================
gz_create_packages()
#============================================================================
# Configure documentation
#============================================================================
configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials.md)
gz_create_docs(
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md")