1 Example: marnav as subproject (git submodule/subtree)
2 =====================================================
4 This is an example project, to show a way to use marnav as a subproject.
6 This demo uses the *ExternalProject* module from CMake.
8 **Note:** it is not advisable to test this demo using git submodule right here,
9 copy this demo somewhere outside the repository.
11 **Note:** this is not a tutrial about git submodule.
20 | +- ExternMarnav.cmake
35 - `cmake` as the cmake module directory.
36 - `extern` the place where submodules are being kept.
37 - `src` the source of the demo project.
39 For easier demonstration and testing purposes, the environment variable
40 `MARNAV_SOURCE_DIR` needs to be set accordingly.
46 Copy the demo to some place, `/tmp/subproject` will do for now,
47 and make it a repository. The variable `${PATH_TO_MARNAV}` points
48 to you local clone. No need to set the variable, just replace it
49 as you execute the following.
52 cp -R ${PATH_TO_MARNAV}/examples/subproject /tmp/
56 git commit -am "Initial Import"
59 Add the library as git submodule:
62 git submodule add ${PATH_TO_MARNAV} /tmp/subproject/extern/marnav
65 Build the library and demo:
68 export MARNAV_SOURCE_DIR=/tmp/subproject/extern/marnav
73 **Note:** the library part (release mode) of *marnav* is being built, no unit tests
74 no tools and no examples. See `cmake/ExternMarnav.cmake` for build options.