forked from gazebosim/gz-math
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
105 lines (87 loc) · 3.88 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-math6 VERSION 6.9.0)
#============================================================================
# Find ignition-cmake
#============================================================================
# If you get an error at this line, you need to install ignition-cmake
find_package(ignition-cmake2 2.8.0 REQUIRED)
#============================================================================
# Configure the project
#============================================================================
set (c++standard 17)
ign_configure_project(VERSION_SUFFIX pre1)
#============================================================================
# Set project-specific options
#============================================================================
option(USE_SYSTEM_PATHS_FOR_RUBY_INSTALLATION
"Install ruby modules in standard system paths in the system"
OFF)
option(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION
"Install python modules in standard system paths in the system"
OFF)
option(USE_DIST_PACKAGES_FOR_PYTHON
"Use dist-packages instead of site-package to install python modules"
OFF)
#============================================================================
# Search for project-specific dependencies
#============================================================================
#--------------------------------------
# Find eigen3
ign_find_package(
EIGEN3
REQUIRED_BY eigen3
PRETTY eigen3
PURPOSE "Provide conversions to eigen3 types")
########################################
# Include swig
find_package(SWIG QUIET)
if (NOT SWIG_FOUND)
IGN_BUILD_WARNING("Swig is missing: Language interfaces are disabled.")
message (STATUS "Searching for swig - not found.")
else()
message (STATUS "Searching for swig - found version ${SWIG_VERSION}.")
endif()
# Include other languages if swig was found
if (SWIG_FOUND)
########################################
# Include ruby
find_package(Ruby 1.9 QUIET)
if (NOT RUBY_FOUND)
IGN_BUILD_WARNING("Ruby is missing: Install ruby-dev to enable ruby interface to ignition math.")
message (STATUS "Searching for Ruby - not found.")
else()
message (STATUS "Searching for Ruby - found version ${RUBY_VERSION}.")
endif()
########################################
# Include python
find_package(PythonInterp 3 REQUIRED) # change to Python3 when Bionic is EOL
find_package(PythonLibs QUIET)
if (NOT PYTHONLIBS_FOUND)
message (STATUS "Searching for Python - not found.")
else()
message (STATUS "Searching for Python - found version ${PYTHONLIBS_VERSION_STRING}.")
endif()
endif()
# Location of "fake install folder" used in tests
# Defined here at root scope so it is available for tests in src and test folders
set(FAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/fake/install")
#============================================================================
# Configure the build
#============================================================================
ign_configure_build(QUIT_IF_BUILD_ERRORS
COMPONENTS eigen3)
#============================================================================
# Create package information
#============================================================================
ign_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)
ign_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md")