Skip to content

Commit 5dba9a7

Browse files
authored
Merge pull request #192 from bakpaul/25_06_add_comments_on_cmake_flags
Add notes on CMake flags for fetched plugins
2 parents b9faf2d + 789ac5e commit 5dba9a7

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 be fetched to be compiled in-tree. To do so, you will need to activate the associated flag `SOFA_FETCH_XXX=ON` (while replacing `XXX` by the capitalized name of your plugin). Note that all '.' in the plugin name should 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 respective 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 should be noted that you can use a local clone of the repository, instead of relying on the fetching mechanism. This can be useful 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 flag `XXX_LOCAL_DIRECTORY` with an absolute path to the local clone of the plugin.
28+
29+
No matter what mechanism you use (fetch or local clone), you will still need to activate it by setting to ON the following CMake flag `{TYPE}_XXX` where TYPE corresponds to one of the following keywords: `{"APPLICATION", "PLUGIN", "DIRECTORY"}`.
30+
31+

0 commit comments

Comments
 (0)