Skip to content

Commit bacfc4a

Browse files
committed
Drop dependency on YARP, add MkDocs custom target
1 parent 9d05ded commit bacfc4a

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

CMakeLists.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ cmake_minimum_required(VERSION 3.12)
33
# Define a project.
44
project(ROBOTICSLAB_INSTALLATION_GUIDES LANGUAGES NONE)
55

6-
# Find dependencies
7-
find_package(YCM 0.10 REQUIRED)
8-
find_package(YARP 3.0 REQUIRED)
6+
# Pick up our cmake modules.
7+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
98

10-
# Set some useful variables - paths relative to the installation prefix.
11-
yarp_configure_external_installation(roboticslab-installation-guides)
9+
# Find dependencies.
10+
find_package(YCM 0.10 REQUIRED)
1211

13-
# Install docs, and also create a copy in the local build tree.
14-
yarp_install(DIRECTORY docs
15-
DESTINATION ${ROBOTICSLAB-INSTALLATION-GUIDES_CONTEXTS_INSTALL_DIR})
12+
# Add custom rule to generate and install the MkDocs site.
13+
include(AddMkDocsTarget)
1614

1715
# Store the package in the user registry.
1816
set(CMAKE_EXPORT_PACKAGE_REGISTRY ON)

cmake/AddMkDocsTarget.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
include_guard(GLOBAL)
2+
3+
# Find MkDocs
4+
find_program(MKDOCS_ABSPATH NAMES mkdocs)
5+
6+
if(MKDOCS_ABSPATH)
7+
include(GNUInstallDirs)
8+
9+
set(_site_dir ${CMAKE_BINARY_DIR}/site)
10+
11+
# Add a custom target to generate the documentation.
12+
add_custom_target(mkdocs ALL ${MKDOCS_ABSPATH} build --site-dir ${_site_dir}
13+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
14+
COMMENT "Generating MkDocs documentation in ${_site_dir}")
15+
16+
# Install the generated documentation.
17+
install(DIRECTORY ${_site_dir}
18+
DESTINATION ${CMAKE_INSTALL_DOCDIR})
19+
endif()

docs/install-ycm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ You may set these values on a per-repository basis. In order to achieve that, br
4545

4646
## YCM and OpenSSL
4747

48-
During its build phase, YCM expects that CMake offers support for the `https://` protocol. Older CMake releases and locally built instances may lack this, see [OpenSSL support](install-cmake.md#openssl-support).
48+
During its build phase, YCM expects that CMake offers support for the `https://` protocol. Older CMake releases and locally built instances may lack this, see [OpenSSL support](legacy/legacy-install-cmake.md#openssl-support-older-distros-and-building-from-sources).

docs/legacy/legacy-install-openrave.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is Legacy documentation regarding OpenRAVE installations. Updated OpenRAVE
66

77
No official PPA, install from source. Install dependencies that must be installed for compilation:
88

9-
- [Install CMake](install-cmake.md)
9+
- [Install CMake](../install-cmake.md)
1010

1111
Note that you will be prompted for your password upon using `sudo`.
1212

0 commit comments

Comments
 (0)