Skip to content

Commit 590a3cc

Browse files
committed
Add notes on CMake flags for fetched plugins
1 parent b9faf2d commit 590a3cc

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

10_Getting_Started/20_Build/50_Activate_Plugins.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ This page aims at summarizing those extensions in tables containing:
1515

1616
The activation directives propose two ways of activating those plugins in the build tree:
1717

18-
1. Through custom CMake flags that [can be added during the CMake call](https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-D). All of those plugins can be activated with one or two CMake flags named using their type and name. For example, the plugin SofaPython3 can be activated by activating both flags `SOFA_FETCH_SOFAPYTHON3=ON` and `PLUGIN_SOFAPYTHON3=ON` (because its sources are in a separate repository).
18+
1. Through custom CMake flags that [can be added during the CMake call](https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-D). All of those plugins can be activated with one or two CMake flags named using their type and name. For example, the plugin SofaPython3 can be activated by activating both flags `SOFA_FETCH_SOFAPYTHON3=ON` and `PLUGIN_SOFAPYTHON3=ON` (because its sources are in a separate repository, see bellow).
1919
2. Through preset that can be [specified during the CMake call](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#introduction)
2020

21+
### Note on fetched plugins
22+
23+
As stated before, some plugins have their own repository and thus need to e fetched to be compiled in-tree. To do so, you'll need to activate the following flag `SOFA_FETCH_XXX=ON` while replacing `XXX` by the capitalized name of your plugin (note: all '.' in the name shuold be replaced by a '_', e.g. to fetch Sofa.Qt, one need to set the CMake flag `SOFA_FETCH_SOFA_QT=ON`).
24+
25+
The repository from which to fetch and the tag to checkout can be changed by using the two flags `XXX_GIT_REPOSITORY` and `XXX_GIT_TAG`. The tag can be either a tag, a branch name or a commit hash.
26+
27+
It has to be noted that you can use a local clone of the repository instead of rely on the fetching mechanism. This can be usefull when you have a version of the plugin on your disk on which you are currently working. To do this, you'll need to make sure `SOFA_FETCH_XXX` is `OFF` and then you can specify the following flag `XXX_LOCAL_DIRECTORY` with an abolute path to the local clone of the plugin.
28+
29+
No matter what mechanism you use (fetch or local clone) you'll still need to activate it by activating the following CMake flag `{TYPE}_XXX` with type taken into the list `{"APPLICATION", "PLUGIN", "DIRECTORY"}`.
30+
31+

0 commit comments

Comments
 (0)