-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
59 lines (48 loc) · 2.41 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
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(gz-utils2 VERSION 2.2.0)
#============================================================================
# Find gz-cmake
#============================================================================
# If you get an error at this line, you need to install gz-cmake
find_package(gz-cmake3 REQUIRED)
#============================================================================
# Configure the project
#============================================================================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
gz_configure_project(VERSION_SUFFIX)
#============================================================================
# Set project-specific options
#============================================================================
option(
GZ_UTILS_VENDOR_CLI11
"If true, use the vendored version of CLI11, otherwise use an external one"
true)
#============================================================================
# Search for project-specific dependencies
#============================================================================
if(NOT GZ_UTILS_VENDOR_CLI11)
# PKGCONFIG_IGNORE can be removed once pkg-config support in CLI11 (see
# https://github.com/CLIUtils/CLI11/pull/523) is released
gz_find_package(CLI11 REQUIRED_BY cli PKGCONFIG_IGNORE)
endif()
#============================================================================
# Configure the build
#============================================================================
gz_configure_build(QUIT_IF_BUILD_ERRORS
COMPONENTS cli)
#============================================================================
# Create package information
#============================================================================
gz_create_packages()
#============================================================================
# Configure documentation
#============================================================================
configure_file(${CMAKE_SOURCE_DIR}/api.md.in ${CMAKE_BINARY_DIR}/api.md)
configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials.md)
gz_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md")